JavaScript

JavaScript

ยท

2 min read

What is JavaScript?

JavaScript is a programming language.

One language that seems to be everywhere. JavaScript has gained a lot of popularity over the years, and, despite facing various stumbling blocks, this language has gone on to become the most popular language in the world today.

JavaScript has come a long way, from a language with a prototype written in just 10 days to the most used programming language in the world.

JavaScript has nothing to do with Java which only uses a similar syntax style {} using its curly brackets which saves us from indentation like Python ๐Ÿ

Now let's see what we can do with JavaScript

Adding interactive behaviour to web pages

Creating web and mobile apps

Building web servers and developing server applications

Game development

To do all this we need to learn some basic data types we can use in JavaScript. Now I want to know who read my blog and want to store the person's name. So I need to store, some data type required.

personName = "Reader,s name";

but the JavaScript engine will not understand what you are trying to convey like my blog LOL. We need to declare

personName using var, let, const .

But What is a variable?

Variable is some sort of a box or a container where you can put in some item but it's a placeholder inside your computer memory.

let personName = "Rajender";

var represents variable and const represents constant

var declared datatype will allow changing its value in future but a const will not allow such thing...

Data Types

Data types are of two types

  1. Primitive
Data TypeDescriptionExample
StringTo represent Textual data"JavaScript", "Your Name"
NumberNumber, floating point (decimal) etc69, 7.0, etc
Big Intinteger with arbitrary precision900719925124740999n
BooleanTo store true or falsetrue, false
UndefinedWhen a variable is declared but not assigned any valuelet name;
Nulldenotes a null valuelet a = null;
  1. Non - Primitive

    | Data Type | Description | Example | | --- | --- | --- | | Object | Key value pairs collection of data | let person = { }; | | Arrays | An array is an object that can store multiple values at once. The array is also a Data Structure | let friends = ["Sheldon", "Leonard", "Raj", "Howard"]; |

This is my first blog about JavaScript.

Please share your feedback

ย