Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Okay, we are not really starting off with a big file, but you can see the point of what's happening. The comments have been stripped out, some of the whitespace is gone, and it seems that we've done a little bit of tweaking here. However, we can take this a little bit further down. Over on the left-hand side I can choose to do an advanced setting for the Closure Compiler, hit Compile again, and that shrinks it down even further, to 479 bytes. Now in fact, Google's Closure Compiler is not just a strict minifier. It does have a few abilities inside it to detect code that might not be called.
So it's definitely an interesting one to run your code through, because it tries to do some optimization and not just minification here. But that's mainly what I'm interested in it for. So I could either grab this and just copy and paste it, although if you see, it's also giving me a copy of a file which I could actually just download here at the default.js link. Because the whole reason is that we as developers need the comments, we need that whitespace. We need the meaningful variable names. The browser doesn't need it in order to run it.
You would end up using the minified one on your site to make for a quick download, but you can always download and view the non-minified one if you want to read the code.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 99894 Viewers
56 Video lessons · 113006 Viewers
71 Video lessons · 81838 Viewers
131 Video lessons · 39274 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.