-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirst.js
More file actions
64 lines (51 loc) · 1.36 KB
/
first.js
File metadata and controls
64 lines (51 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//String type
fullName = "Ashikh Shaikh";
hisFriendName = "Suraj Pawar";
console.log(fullName + " is the friend of " + hisFriendName);
//Number type
grade = 14;
console.log(grade);
//Boolean type
isTrueOrFalse = true ;
console.log(isTrueOrFalse);
//null and undefined
Null = null;
Undefined = undefined;
console.log(Null);
console.log(Undefined);
//let , const , and var
//global scope variable
var google = "Google is google";
{
//block scope variables
const PI = 3.14;
let apple = "Think diiferent";
console.log(apple);
console.log(PI);
}
console.log(google);
//Primitive Data Types 7
let a = 123.456; // Number
const str = "1234"; //constant
let isBoolean = true; // boolean
let isUndfined = undefined; // undefined
let b = null; //null
let x = BigInt("123456"); //BigInt
let y = Symbol("hello...!"); //Symbol
console.log(typeof a);
console.log(typeof str);
console.log(typeof isBoolean);
console.log(typeof isUndfined);
console.log(typeof b);
console.log(typeof x);
console.log(typeof y);
//Non - Primitive datatype - objects or object types like Arrays , Fucntions
const Student = {
fullName : "Rahul Jadhav",
grade : 5 ,
isAlive : true ,
cgpa : 9.12,
};
console.log(Student["fullName"]);
Student.fullName = "Suraj Pawar";
console.log(Student["fullName"]);