Why JavaScript is So Popular
Technical Blog Post 3
JavaScript is a client-side scripting language, meaning that it is primarily run as part of a user’s own web browser as opposed to on a distant server. After it was introduced by Netscape in 1995, JavaScript was initially ignored by most professional programmers. It gained popularity beginning with the creation of AJAX (a technique which allows a web application to send and retrieve data from a server without interfering with the display and behavior of the existing page). Techniques for allowing JavaScript to create server-side applications were also developed, making it possible to build just about any sort of web application with the language. Because of this, David Yang, the director of a coding bootcamp that primarily focuses on JavaScript, claimed that “JavaScript is the one true language of the web.” The data analysis firm Redmonk has found JavaScript to be the most popular programming language.
So why is it that JavaScript has become so popular?
Versatility:
JavaScript works across browsers and devices.
Speed
JavaScript is fast because its code is run immediately. This is possible because JavaScript is run on the client’s browser rather than having to contact a separate server.
Simplicity:
It is simple to learn since the syntax isn’t too complex. JavaScript also has detailed libraries which contain pre-written scripts to make writing in the language easier. The following image is an example of what Javascript code looks like.
Image from Somesgar’s Blog
Interactivity:
JavaScript can manipulate HTML to make web pages more interactive. For example, a “prompt’ function asks a user to type a response, then remembers it. So using this, you can ask a user “what is your name?” This allows for a better user experience.
Image from The Code Project
Disadvantages?
What are some possible disadvantages of JavaScript, you may ask? JavaScript sometimes creates security problems since it runs on the client’s computer. It also may be interpreted differently by different browsers, but this can be avoided by testing it in all major browsers. Clearly, the disadvantages aren’t too significant since they haven’t prevented JavaScript from taking over the world!.