The Canvas

01 Sep 2017

JavaScript is the first programming language I learned, alongside HTML and CSS. I was in high school at the time, and to be perfectly honest, learning JavaScript in particular was a pure coincidence. I googled something along the lines of “How to code a game” and between Codecademy and the YouTube tutorials I watched, the common denominator was JavaScript. Since then, I have used JavaScript to build simple web games using the HTML5 canvas element.

Overall, my opinion of JavaScript is that it’s a very useful and flexible language. Compared to other languages that I have learned, you can get away with much more in JavaScript then say Java or C++. Some might consider this a flaw of the language, but I feel it just adds to its usefulness. The syntax and concepts you use when programming in JavaScript follows closely the syntax of other languages, but the flexibility to manipulate variables, objects, and functions whenever and wherever proves very practical and in general simplifies your code.

Though I had had experience in JavaScript in the past, my knowledge of it had waned as my formal University studies up until now had focused heavily on Java. In reviewing the language, I became acutely aware of all of the conventions that had been drilled into me for using Java, and how they were not necessarily needed in JavaScript; I could choose how I was going to code and organize my projects with a much greater degree of freedom. I had also not heard of using let as opposed to var. While I had never encountered an issue arising from the function scope of var when I was building canvas games, picking up the habit of using let will no doubt prevent any such issues in the future.

Web development is a bustling enterprise at the moment and in all likelihood is not going away any time soon. Knowing JavaScript gives you the toolset you need to do just about anything you can think of on a website; JavaScript remains the typical choice when manipulating web pages. That is not to say that JavaScript is the only language option when developing a webpage, but it is the most common choice. Even outside of web development, the knowledge gained from JavaScript can be used with projects in other languages and environments.