JavaScript is a programing language that helps us to create a dynamic website easily. It can be considered as a tool that gives up the power to manipulate anything on a website( DOM manipulation) such a changing text, images, etc on certain actions being taken the user.

HTML and CSS are markup languages that allow us to describe and define elements within a document(static website), but JavaScript is the one according to me which puts life and soul to the website we are creating by allowing us to communicate instructions to a machine.

_Note : _Javascript is created by Brendan Eich in 1995, while he was working on the Netscape Navigator. Netscape Navigator was one of the Internet’s first web browser.

Every web browser has a built-in JavaScript engine to run the JavaScript code. The JavaScript console or the web console is something that we can use as a sandbox to play with JavaScript.

Data type and variables

Data and data types are building blocks of any programming language because they help us to organize information and determine how our program will work.

  • Numbers

  • Strings

  • Objects

  • Boolean etc…

Comments are something that is used to note down some notes in our code which the machine doesn’t execute. Comments must be often used while we are writing our code for a better understanding of a piece of code. In JavaScript, there are two ways to specify comments

// this is a single-line comment

/*
this is
a multi-line
comment
*/

Variables are used to store data. When you create a variable, you write the name of the variable using camelCase.

var Name = "Sudhish";

var Age = 20;

_Tip : __Escaping a character tells JavaScript to ignore the character’s special meaning and just use the literal value of the character. In JavaScript _\_ is used for escaping. _"Hello, \" My name is Sudhish \" "_ will give us the output as __" Hello, "My name is Sudhish"_

JavaScript is known as a _loosely typed language, _so we do not need to specify the data type explicitly, the JavaScript Engine will automatically interpret the code and will do the code conversion. We can do a strict comparison by using the === while doing conditional checks.

#javascript-basics #javascript #web-development #front-end-development #programming

What is JavaScript? All you need to know as a beginner?
1.35 GEEK