Function Declarations vs. Function Expressions

I prefer function expressions over function declarations

JavaScript, JavaScript...

Lets start with a short quiz. What is alerted in each case?:

Question 1:

Question 2:

Question 3:

Question 4:

If you didn’t answer 8, 3, 3 and [Type Error: bar is not a function] respectively, read on… (actually read on anyway 😉 )

View original post 1,220 more words

Advertisements