hoisting,closure

 closures:---

function add(x) { 

return function plus(y) 

 { return x+y;

    }}var value=add(5);

console.log(value(6));//reference of outer function is hold by inner function...


Hoisting is JavaScript's default behavior of moving declarations to the top.



Comments

Popular posts from this blog

interview questions js[ Anurag Singh ProCodrr]

reactnative_creation