I thought JacaScript doesn’t have destructors (in the memory/resource management sense) or finalizers…
WebSocket's destructor: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/c...
HTTP server's destructor: https://nodejs.org/api/http.html#serverclosecallback
Etc etc etc.
You're right that JS/C/Go don't have language features called destructors, but they have a whole bunch of types with ad-hoc destructor functions which you have to remember to call if you want to avoid leaking resources.