Monthly Archives: August 2017

Drawing Ellipses (Ovals) to an HTML5 Canvas with JavaScript

The JavaScript code below, when run, prompts the user to input information about an ellipse (oval), and then draws that ellipse to the screen. To see it in action, copy it into an .html file and open that file in … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

A Binary To Image File Transcoder In JavaScript

The JavaScript program below, when run, allows the user to load an arbitrary file as bytes, convert it to a PNG image, save the image as a file, reload that image file, convert it back to bytes, and re-save the … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

A Rudimentary JavaScript Minifier

The code below implements a rudimentary JavaScript minifier. A “minifier” takes a code listing and removes unnecessary space in it, primarily by renaming functions and variables using shorter names. Minifying JavaScript allows it to be transported and compiled more efficiently. … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment