3 ms·
var results in the same behavior in chrome (empty string for a function name) It looks like babel does this little nicety for stack-trace readability.
by spamizbad 11y ago
var results in the same behavior in chrome (empty string for a function name)
It looks like babel does this little nicety for stack-trace readability.
- gotchange 11y agoI think Babel converts the code to ES5 and then execute the statements and therefore the function's name is printed to the console just like what you expect from good old ES5 code.