how to write and implement heap in javascript code example Example: nodejs heap usage process.memoryUsage()