Answer the question
In order to leave comments, you need to log in
What is this syntax called?
const a = () => {
return 1;
}
console.log(a);
() => {
return 1;
}
Answer the question
In order to leave comments, you need to log in
What? This is not an assignment to a variable, but a declaration of a function a that returns 1 a()
will print 1 to the console.
This is equivalent to this code:
function a () {
return 1;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question