JavaScript can be run in the browser by including the external script file using the script
tag, writing it within the HTML page using the script
tag again, running it in the browser console or you can also use REPL.
Visit the following resources to learn more: