how to create script using js code example
Example 1: javascript create script tag
var script = document.createElement("script");
script.src = "https://url.com/";
document.head.appendChild(script);
Example 2: how to run js script
$ node // now we can execute code in console
> 2 + 4 //our input
6 //output
> .exit // or ctrl + c