ES6 - Use Arrow Functions to Write Concise Anonymous Functions

Hello everyone:

‘Run Test’ button is not responding to my clicks.
I have been trying to test my code snice yesterday .

Your code so far

var magic = function() {
  return new Date();
};

const magic = () => {

return new Date(); 


}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.47

Challenge: ES6 - Use Arrow Functions to Write Concise Anonymous Functions

Link to the challenge:

That’s because you have a syntax error in your code and thus it can’t execute. Look at the console pane and you should see the error.

“Rewrite the function…”

This means to completely replace the current function with a new one. So don’t add a new function with the same name below what is already there. Change what is already there. You should only have one function named magic.

1 Like

Thank you very much .

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.