Problem with "Use Arrow Functions to Write Concise Anonymous Functions"

Tell us what’s happening:

Hello,

I used the concise ES6 anonymous function format but I get errors. Why is that? How can I place “use strict”?

Your code so far


//var magic = function() {
 // "use strict";
  //return new Date();
//};



const magic = () =>  new Date();

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions

I deleted my Javascript comments (the “//” and the text) and it worked like a charm.!

I just put in a single line:

const magic = () =>  new Date();

There is definitely something wrong with FCC code editor…Sorry to say…Comments should be ignored!

UPDATE; I just had the same problem with the next exercice!!

I can’t put Javasipt comments or FCC won’t validate my code…

const myConcat = (arr1,arr2) => arr1.concat(arr2);
console.log(myConcat([1, 2], [3, 4, 5]));

the reason is that FCC has a test suite that is basically code that tries to anticipate your answer. Obviously comments are never going to be anticipated by the test suite so they will always mess up the test.