DEV Community

Cover image for What is Javascript?
Parwinder 👨🏻‍💻
Parwinder 👨🏻‍💻

Posted on • Updated on

What is Javascript?

Definition

A direct quote from the Mozilla developer's network or MDN

JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved.

In short, it makes your pages feel more dynamic. A webpage generally speaking consists of three key elements:

  1. HTML (Hypertext Markup Language): This allows you to create the structure of the web page
  2. CSS (Cascading stylesheet): This is to make that web page look pretty 😊
  3. JavaScript: Allows you to do anything dynamic with the page including fetching data from a server or making the page interactive

History

JavaScript was not always known as JavaScript. It started with the name LiveScript. At the time of the creation of JavaScript, Java was a common language, and it was decided to add the word Java to it. It does not have any relationship with Java, in any case. There is a famous/corny saying

Java is to JavaScript as a car is to carpet

As it evolved, it got to be known as ECMAScript. The name JavaScript is a trademark owned by Oracle Corp. in the United States. Don't believe me? Check it out

Why is JavaScript popular?

When I say JavaScript is popular, I mean it. According to the Stack Overflow 2019 developer's survey, it is the most popular language. For 7 years in a row!

Stack Overflow 2019 Developer Survey Results

So what makes it so famous?

  1. It works well with the other two components of a webpage (HTML and CSS)
  2. Minimal learning curve (which has been considered a good or bad for the language)
  3. Supported by all major browsers and enabled by default
  4. Works without any compilation or transpiling
  5. It can run in the browser or server-side. It can run on anything that can support the JavaScript engine (V8, Trident, SpiderMonkey)

Hopefully, by now, I have sold you on the idea of JavaScript and why it is fun to work with. In the next few blog posts, we will go over the basics of running JavaScript and introduction to principles of JavaScript. As we take a deeper dive into these basics, you will also realize that it's relatively easy to make mistakes if you don't know what you are doing. We will learn from the mistakes of the past and try to be a better JavaScript developer.

Discussion (5)

Collapse
bhagatparwinder profile image
Parwinder 👨🏻‍💻 Author

I always welcome constructive feedback. I honestly do not know what part of my post are you referring to in your first paragraph. Is it the fact that I called it LiveScript?

As far as I am aware the prototype that came out of Netscape was called Mocha that transformed to LiveScript and eventually to JavaScript. Correct me if I am wrong and I'll happily change the post.

So all the factors I listed for JS being popular/powerful do not matter and it gained popularity solely because it is run by a not for profit? I do see not-for-profit as another good selling point to JS but not the sole selling point. That being said, for-profit companies like FB created React and I would call it a good library.

bhagatparwinder profile image
Parwinder 👨🏻‍💻 Author

This is great to know. Appreciate all the feedback and I hope I continue to get the same in the future. My knowledge about the history of JavaScript came from an auth0 article:

auth0.com/blog/a-brief-history-of-...

Haha I do agree with the great work Mozilla Foundation and W3C have done for the JS language.