ITC Infotech interview question

How memory allocation is done in javascript