const str = "hello world";
const [a, b, c, d, e, f] = str;
console.log([...[a, b, c, d, e, f], ...str]);
Ответ:
[ 'h', 'e', 'l', 'l', 'o', ' ', 'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd' ]
JavaScript test | #JavaScript
JA JavaScript test @js_test · 9.68K subscribers const str = "hello world";
const [a, b, c, d, e, f] = str;
console.log([...[a, b, c, d, e, f], ...str]);