Challenge copy-array-items-using-slice has an issue.
If I simply return the array by slicing it, like this -
function forecast(arr) {
// change code below this line
return arr.slice(2,4);
}
// do not change code below this line
console.log(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms']));
it returns a minified react error .
The function returns the same value, as expected when I copy paste into the console.
It was fixed after restarting browser, but should still be fixed.
Check out CONTRIBUTING.md to get your local development environment set up.
The issue is in the following line:
https://github.com/freeCodeCamp/freeCodeCamp/blob/885c73abac6bdc492f5fe913dd793332dbbb5dc3/seed/math-challenges/02-javascript-algorithms-and-data-structures/basic-data-structures.json#L254
The last <code>
element in the message is never closed. It should be closed with </code>
at the end of the message, right after the closing square bracket (]
)
If you need help, please visit our contributors chatroom. We're always happy to answer any questions!
Happy coding!
I'll give it a go, Timo!
Most helpful comment
I'll give it a go, Timo!