Tell us what’s happening:
This code is executing successfully with and without semicolon at the end. But how is this possible .??? any idea
Your code so far
const magic = () =>{
"use strict";
return new Date();
};
OR
const magic = () =>{
"use strict";
return new Date();
}
Link to the challenge:
Semicolons are often not strictly required by JavaScript (unlike other languages).
If we didn’t use a semi colon, FCC compiler is showing an error , but still when we press ctrl+enter, the code is executing, which is so funny…
The linter is telling you that you should use a semicolon.
1 Like