What is JavaScript?

Filip Van Doninck
Texidi: Your Journey Into Tech
4 min readJul 15, 2019

Next up in our Tech Journey is a well known programming language: JavaScript. JavaScript was first released in 1995 and is now the most used programming language on the Web. Any technology that has the extension ‘.js’ (like node.js or vue.js) is built with JavaScript.

Before JavaScript existed, the internet was basically a place of ‘read-only’ (websites) that you could display by a browser. HTML provided the content of those websites, CSS would make sure it looked pretty. The browser (your window to the online world) was then able to display content (via HTML) in a pretty way (via CSS).

JavaScript logo

In 1995, the company Netscape started to think: “what if we could run a programming language in our browser, so we could actually do something else with those websites, rather than just read them?” In 10 days, Netscape’s Brendan Eich wrote JavaScript: a programming language that runs in your web browser. Anytime you like a post, retweet something or book a room on AirBnb via Google Chrome or Firefox, you are using JavaScript.

So what does it mean to be running in a browser? Basically, you have frontend (or client side) code and backend (or server side code). Frontend code is code running in the window of the user, for example, the browser on your laptop or an application on your phone. This frontend code will change what the user can see. So whenever you comment on a Facebook post and press enter, your comment will appear underneath the post, without having to refresh the whole page. This is what the frontend code will be doing.

However, that is not enough. Because the comment you made is only visible to you. The frontend code didn’t notify the Facebook database that your comment was made. This is why we need backend code. The backend (or server side) code runs on the server (for now, just think about it as a big computer that is owned by the website, in this case Facebook) and will make sure that, when you like or comment on something, Facebook will keep track of what you did. So that the next time you visit Facebook, your comment is still there and can be seen by other people. The place where it stores that information is the database.

So what would happen if you would only have frontend? Basically, you would be able to like a Facebook post (interact with the website), but it would only be visible to yourself. Whenever you would then refresh or leave the page, your ‘like’ would disappear.

So what would happen if you would only have backend code? Long story short: you would still be able to like a Facebook post (interact with the website), but it would only update the page (what you can see) when you refresh the page, or leave the page and come back to it.

Photo by Delbert Pagayona on Unsplash

So when JavaScript was created, it would only run as frontend code in your web browser. In 2009 however, Ryan Dahl created the runtime environment Node.js, something that would make JavaScript even more popular. Node.js is a runtime environment for JavaScript that makes sure it can also be used as backend code.

Node.js is for JavaScript what water is for a fish and a fishbowl. It’s nothing more than an environment that ensures that your JavaScript code (the fish) can run (swim) in other environments (such as your fishbowl) than the browser (the river where the fish came from).

So now, JavaScript can be used to build almost anything. Machine learning, Blockchain or web applications, they all can be created by using JavaScript and Node.js.

Texidi: Your Journey Into Tech helps you easily understand the tech recruitment field with weekly content, podcasts with experienced recruiters and much more to come!

Follow us on Instagram and LinkedIn to receive regular updates and stay in the loop for new content and tune in for the first episode of our podcast seriesRecs & Devs and discover how to build up strong relations with developers, and how to make your way into tech!

Missed our first blogs? Check them out!

--

--