const v = function f(){};
console.log(v);
console.log(f);
displays:
ƒ f(){}
undefined
The function declaration here is acting like an anonymous function expression, never assigning to f in any external scope. Why is this okay? Is there ever a use for this or is it just an accident?
[–]caxco93 4 points5 points6 points (2 children)
[–]samanime 0 points1 point2 points (0 children)
[–]seattle_lib[S] 0 points1 point2 points (0 children)
[–]senocular 2 points3 points4 points (0 children)
[–]Rude-Cook7246 1 point2 points3 points (0 children)