title: How variables are allocated memory in Javascript?
body: <p>I would like to know how local variables are allocated memory in javascript.
  In C and C++ local variables are stored on stack. Is it the same in javascript? or everything is stored in heap?</p>