Skip to content
Advertisement

Tag: heap

NodeJs heap-js module: Heap is not a constructor

I am trying to initialize a minimum heap/priority queue in my server.js using the head-js module (https://github.com/ignlg/heap-js). When I run my code, I receive the following error: TypeError: Heap is not a constructor However, according to the documentation, I am initializing the heap correctly, putting in a custom constructor as the parameter. Below is my code: Answer There’s a difference

Advertisement