javascript memory heap code example
Example 1: javascript heap out of memory
export NODE_OPTIONS=--max_old_space_size=4096
Example 2: complex type in javascript and memory allocation
array and objects are complex type
if assume two array
a=[1,2]
b= a
then we are instructing b to point to a and if any changes is done in b if will affect a as well.