You can use the Safari console on any Mac in a similar way to the Terminal, but for JavaScript commands. This allows you to do things like perform calculations with a ton of functions and variables. You can even do loops and output to a blank web page if you like.
Note: This is Club MacMost exclusive content. To view this video click the thumbnail below to go to the post as Patreon.com. Once there you will be able to view the video as long as you are logged into your Patreon account and a current supporter of MacMost at the "Club MacMost" or higher level.