Convert the existing function to the new style of ES6

/* Change your code here */
var magic = function() {
  return new Date();
}**Should replace var keyword with const.
magic should be a constant variable (by using const).
magic should be a function.
magic() should return correct date.
function keyword should not be used.
Refer the example for the function with no body i.e const myFunc = () => "value";**```
<redacted solution by mod>

Hello there, @reyan

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.


@prince608

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

This was my first post, I wont do that again, thank you.

1 Like

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