2021-01-25 18:17:42 +03:00
|
|
|
// A spread operator `...` copies the elements of one array into another
|
|
|
|
function main(a: [u8; 3]) {
|
2021-03-18 22:19:07 +03:00
|
|
|
const b = [1u8, 1u8];
|
|
|
|
const c = [1u8, ...b];
|
2021-01-25 18:17:42 +03:00
|
|
|
|
|
|
|
console.assert(a == c);
|
|
|
|
}
|