how to use ide to run javascript code example

Example: best javascript ide

Depends on your habits
- If you like powerfull IDE that includes everything,
Webstorm is a good start but it is quiet greedy.

Otherwise, Visual studio code is a good choice,
it's lighter, but need more configuration and installing
extensions (like snippets, linter, debugger, ...). At the end,
you can approximally get to WebStorm performances but in this
case you take what you need, so it takes less time to start/dev.

There are also some other apps like notepad (if you're suicidal),
vim, atom, brackets, ... But the support / community on WS/VSC
are juste colossal.