I came up with the exact solution that was given in the hints but I can’t run the tests because of this: “TypeError: Cannot read property ‘presets’ of undefined.”
Your code so far
function spreadOut() {
let fragment = ['to', 'code'];
let sentence = ["learning", ...fragment, "is", "fun"]; // Change this line
return sentence;
}
console.log(spreadOut());
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36.
Challenge: Combine Arrays with the Spread Operator
Well , for whatever reason, when I tried it again using Chrome, it worked with no issues. I don’t know if that’s because I had already submitting the correct answers in Firefox. But things seem to work now. They will work better once I understand the for in loop thing