4 ms·
That doesn't avoid hoisting though ;)
by warfangle 12y ago
That doesn't avoid hoisting though ;)
- couchand 12y agoYes, actually it does. A named function expression and a function declaration are distinct concepts. The latter is function-hoisted (the whole body goes to the top), whereas the former is only var-hoisted (the body remains in place).