Introduction to JavaScript – Everything you need to know as a beginner

JavaScript is like toaster for turning out Bread(HTML) and Butter(CSS) into something which could be Eaten(Web Page). More specifically it’s one of pilar of Web as well.

  • HTML for specifying content of Web Page
  • CSS to decorate that content
  • javaScript to interact with that content

Nowadays most commonly javaScript is used for Web Development, not only that there have comes up many other frameworks around JS which are very useful for developing websites like NodeJS.

Why it’s called JavaScript?

JavaScript started as Mocha Programming Language developed by Brendan Eich, then a programmer at NetScape, it quickly changed to LiveScript and eventually become well known as JavaScript owing to it’s syntax similarities with JAVA.

It’s kind of a mixup of three programming language – It’s syntax is similar to JAVA, functions kind of same as Scheme and Inheritance feature from Self.

How does javaScript work/runs?

Inside Web, JS could be used in two ways – Server Side(Running javaScript in server) or Client Side(JavaScript in browser).

JavaScript can execute not ony in browser, rather on server as well or in general on any device. For that a specific program called JavaScript Engine is required to be installed on device.

Most of browsers nowadays have a JS Engine, for example Chrome have V8 and if you want to run javaScript inside a server for some reason then you can setup an Engine as well.

What can javaScript do?

JavaScript owing to it’s feature of being able to run on literally any device is very useful for developing Websites. Here are some of things which can do –

  • Adding HTML code to a page
  • Modifying content of a webpage
  • Changing styling
  • Reacting to user actions like clicking on a button
  • Sending requests across a network(Browser to Client or vice-versa)
  • Interactive Maps
  • Regularly updating content on a webpage

These are some of scenarios which could be implemented using javaScript in context of Websites. But it could be used for doing much more stuff like building up amazing looking webapps.

What javaScript cannot do?

JavaScript is quite powerful in terms of sending requests across a network, accessing files from internal storage and sending to a server, opening newer webpages when user clicks a button and much more.

These are great features of language but in order to prevent some malicious website to just take over your browser and do crazy stuff like accessing your internal storage data, it need to restricted in many ways.

  • JavaScript running inside a web browser on a device cannot access internal storage or Operating System files of that device.
  • It cannot fetch files from storage and send across the network without user permission.
  • JavaScript running in one browser tab cannot interact with other browser tab, this is called Sandboxing.
  • JavaScript loaded inside one tab on a browser cannot open a new tab unless user does it.

Why JavaScript is the best?

Over the years, JavaScript has gained a lot of popularity over other similar languages like JAVA, Python and others. The primary reason being it’s quite easy to develop websites using it.

  • Easy integrable with HTML and CSS
  • Can interact with HTML/CSS code, even to update/make changes to their code
  • Can be executed to generate HTML code which then can be served to a browser window
  • For building amazing Web Apps

Why JavaScript is so popular?

There could be possibly many reasons owing to which it’s popular, what I have noticed over last 3 years is that as more and more businesses/companies are going online that’s why there is higher demand for Website Developers. Mostly these people trying to get online want to have a fancy looking website, for doing that javaScript is one of the best possible answer. That may be the reason for it’s popularity nowadays.

Like in recent survey by StackOverFlow, it shows that out of all developers survey almost 60% loved javaScript programming language or is their language for choice for writing code.

Source – StackOverFlow Developer Survey 2020.

StackOverFlow Developer Survey 2020

Conclusion – Should you learn javaScript?

Definitely for sure learn javaScript either your into software industry or not it doesn’t matter much. Having skill to build up Websites would always be a useful skill. Not only that if later in your career(other than in software itself) you want to make a switch then jumping to Web Development would be easy one.

Moreover if in case you don’t want to believe on me then better listen to inventor of JavaScript Brendan Eich’s advice itself.

Bredan Eich talking about which language to learn

On the top of this, it’s high in demand. A lot of companies are looking for JavaScript Developer. Just a simple job search on Linkedin would tell you the answer.

It’s upto you whether you want to a JavaScript Developer or not.

Gagan

Hi, there I'm founder of ComputerScienceHub(Started this to bring useful Computer Science information just at one place). Personally I've been doing JavaScript, Python development since 2015(Been long) - Worked upon couple of Web Development Projects, Did some Data Science stuff using Python. Nowadays primarily I work as Freelance JavaScript Developer(Web Developer) and on side-by-side managing team of Computer Science specialists at ComputerScienceHub.io

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts