We're a place where coders share, stay up-to-date and grow their careers.
can you explain, why out is function
Ok, so due to hoisting, the variables are put first followed by functions. So it looks like:
function func(){ var foo; function foo(){}; return foo; foo = 1; foo = 'hello'; }
can you explain, why out is function
Ok, so due to hoisting, the variables are put first followed by functions.
So it looks like: