You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From reading I've done in the past, technically this is an anonymous function, and it's only through interpreter convention that it looks for the assignment to a variable to try an associate a name with the function, largely to aid with debugging. We can see in other situations that (passing a new function expression as an expression to another function) that the name property will not be populated. Consider:
constpn=function(fn){console.log(fn.name);};pn(pn);// prints "pn". Not standard, but everything does it 🤷 pn(function(){});// prints ""
From reading I've done in the past, technically this is an anonymous function, and it's only through interpreter convention that it looks for the assignment to a variable to try an associate a name with the function, largely to aid with debugging. We can see in other situations that (passing a new function expression as an expression to another function) that the name property will not be populated. Consider:
Originally posted by @anselrognlie in #7 (comment)
The text was updated successfully, but these errors were encountered: