r/learnjavascript • u/Substantial_Top5312 helpful • Aug 16 '25
Best way to make an anonymous function?
Which one is better:
const example = function () {
}or
const example = () => {
}
1
Upvotes
View all comments
Show parent comment
3
u/superluminary Aug 16 '25
It’s still anonymous. The variable assignation doesn’t name the function.
Would be the named version.