Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn(); //--> Error, fn is called before the function is assigned!
- var fn = function () { alert("abc"); }
- fn2(); //--> Works as expected: the fn2 declaration is hoisted above the call
- function fn2() { alert("test!"); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement