744 B
744 B
title | localeTitle |
---|---|
Combine Arrays with the Spread Operator | Объединить массивы с оператором распространения |
Объединить массивы с оператором распространения
- Решение в точности соответствует приведенному примеру. Просто вставьте массив
fragment[]
массивsentence[]
в нужном индексе.
Решение:
function spreadOut() {
let fragment = ['to', 'code'];
let sentence = ["learning", ...fragment, "is", "fun"]; // change this line
return sentence;
}
// do not change code below this line
console.log(spreadOut());