til

Write Javascript/Node in a notebook

I am a big fan of Jupyter notebooks, they help me tremendously to prototype and test code. In the past I was struggling to prototype and test code in Javascript/Node, because I was missing a Notebook environment and using the node REPL or debugger was not an equivalent replacement.

Luckily, there is a VSCode extension called Node.js Notebooks (REPL) that allows you to write Javascript/Node in a notebook.
Create a .nbb file and start writing your code. The nice thing is that top level await is supported, so you can write async code without having to wrap it in a function.