WORK IN PROGRESS… STILL UPDATING THIS PART

Before getting into React or Node, every web developer should know at least basic Vanilla JS but if you can master JS, things will be easier while working with different libraries or frameworks.

Javascript is a high-level scripting language, mainly released to run on the browser natively to create more interactive webpages but since it’s been released, it’s evolved a lot and today there is nothing you cannot do with only JS knowledge. You can build an entire full-stack application by using JS on both Frontend and the Backend, you can build games running on browsers or you can build mobile applications, and games by using it. That is why JS is so powerful, popular and based on developer surveys, it’s been the most searched language for years.

In this section, I’ll share the most common and important parts of Javascript with some basic examples.

Comments in JS

Comments are the most basic but important thing in JS. Leaving some comments about the written code will help you later when you come back the same line or if you are working in a team, you can let others understand or share some details about the code that you wrote.

Single Line Comment

// This is for the single line comments

Multi-Line Comments

/* This
is 
for
multi-line
comment
*/

Variables

We can save values to variables and we can use them later when needed.

Until the release of the ES6, we used to declare variable by using var keyword, since then, we have two more keywords which are let and constWe use them all for the same reason but they are slighty different from each others.

Let, Var and Const

Let and const are introduced with the ES6 version of JS. Until ES6 we use var to declare variables but to be more strict and clearify some stuff, let and const have been released. They are all serve to similar thing but they all behave slightly different which effects the result.

Var

Let