Skip to content

Commit f7f3d5c

Browse files
committed
variables and datatypes
1 parent 7857795 commit f7f3d5c

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

01_basics/01_variable.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const id=1 //Used for declaring the constant value
2+
let name="Aryan Pal Dhangar" //Used to declare the variable
3+
var email="aryanpal1024@gmail.com" // Also declares the variable but not understand the Scope
4+
mobileNo="7880497004" //Also used to declare the variable but its a bad practice
5+
let status
6+
/*
7+
Recommeded not to use var keyword to declare the variable because if we change the variable value in the scope it will change it globally.
8+
So instead of it we use let keywords.
9+
*/
10+
console.log(id);
11+
console.table([id,name,email,mobileNo,status]);
12+

01_basics/02_datatype.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"use strict"; // Treat all JS code as Newer Version
2+
3+
// alert('Hello World') // We are using NodeJs not using Browser JS
4+
5+
/*
6+
Primitive Datatypes
7+
-------------------
8+
number= 2 power 53
9+
bigint
10+
string="Sting"
11+
boolean=true,false
12+
null = standalone value(Representation of Null Value)
13+
undefined= unassigned values
14+
symbol= unique
15+
16+
*/

0 commit comments

Comments
 (0)