title: Does JavaScript have a memory heap?
body: <p>In other words, what options do I have to allocate memory in JavaScript?</p>
  
  <p>I know you can allocate memory either globally, or inside function scope. Can I allocate memory dynamically? What does the <code>new</code> operator really mean?</p>
  
  <p><strong>Edit:</strong> here's a specific example. How would you implement reading an integer value from the user - <code>n</code>, and then read <code>n</code> integers into an array?</p>