I tried to use browsers' console, but it interprets
apt install nodejs
Then if you create a file named
hello.js like this...
...you can execute it like this:
$ node hello.js Hello!
NodeJS comes with several modules for various tasks, including interacting with your desktop and creating graphical applications. Use
apt search ^node- to list those packaged for Ubuntu, or check out NPM for many other third-party packages.