Thank you for your reply. In the develop menu on Safari you can open
console by selecting show error console. If you write your java script on
text edit does the console just see it and run it through the console?
You’d put the code in a script tag on the web page, then open that page with the browser
There’s also nodejs which skips the whole browser business
There’s also a webserver, but you can just as well tell your browser to open the page (the html page) directly from your filesystem.
You can see the output in the console of the browser (the code doesn’t modify the page, it prints to the console)