So why is JavaScript so popular? Let’s take a quick look at its origins. The language was created by Brendan Eich in 1995. The language, that was first used for the Netscape browser, has also dominated all of the major browsers we have today. And while the names JavaScript and Java are similar, they basically have nothing to do with each other. The name for JavaScript, which I will now refer to as JS, had been changed from Mocha to LiveScript to JavaScript because the programming language Java had been gaining popularity. So the name change was made in order to piggyback on the success of Java.

JS has many things going for it despite its confusing name. One is that it is a relatively easy language to learn. If you already know other programming languages, there are similarities that will make it easier to learn. If you are a beginner and this is your first language, the syntax of JS is similar to that of English. After you learn JS, other languages will be easier to learn as well. JS is also a flexible language, and allows a lot that other languages would not. This can be good or bad depending if you use it towards your advantage. JS also runs client-side, which means that it runs on your browser instead of on the server, so there’s no wait time between the server and browser. This also helps reduce the load on the website server, especially for those that experience a lot of traffic. These are big pluses because that means JS is fast.

I didn’t find too many cons. The two that were mentioned the most were related to security and rendering variety. Because it is client-side and loads from your browser, there is a risk that malicious code may be executed. This is why some opt to disable JS–you get more security this way, but you miss out on the full functionality of the site. Also, JS may look and function differently in different browsers. There is variation in rendering across these browsers which results in irregularity and instability.

JavaScript is still an increasingly popular language. You can really do some cool stuff with JS in conjunction with HTML and CSS as well as other languages. I’m still a newbie at JS, and the syntax is still leaving me a tad baffled, but I’m slowly getting the hang of it. As a language that is used so much JavaScript is pretty invaluable.

Image