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. This implementation is fairly primitive. It's unlikely to work for code that references more built-in functions and objects, or that declares more that about 52 variables or functions. Like many of the programs on this site, it is intended mostly as a basis for further work.

To see the code, or to make a comment, please visit "https://thiscouldbebetter.wordpress.com/2017/08/01/a-rudimentary-javascript-minifier".

Enter JavaScript code in the textbox and click the button to minify it.