I'm thinking that ChatGPT is confusing ".js" with ".jsl" here. What it's describing would work with JSL code, but not Javascript.
In addition to Craige's response, you might be able to use the JSL command Run Program() in conjunction with node.js to get something to work.