-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05_dataTypeSummery.js
55 lines (40 loc) · 1.13 KB
/
05_dataTypeSummery.js
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
// Primitives are 7 types:
// String, Number, Boolean, null, Undefined, bigInt, Symbol
let num = 100;
let age = 18;
let str = "Soubhagya";
let value = null;
let topic = "";
let bigNumber = 12345678645679789n;
let isPrime = true;
const score = Symbol('3345');
const anotherScore = Symbol('3345');
// console.log(score === anotherScore);
// Reference (not Primitives):
// Array, Object, Function
const Heros = ["JayHanuman", "BholeShivShankar", "JayJagannath", "JayTariniMaa", "JayMangalaMaa"];
const obj = {
name: "Soubhagya",
age: 18,
course: "javaScript"
}
const myFunction = () => {
console.log("It is my Function.");
}
// console.log(typeof bigNumber);
// ++++++++++++++++++++++++++++++++++++++++++++++++++ //
// Stack(Premetive) and Heap(NonPremetive)
let myName = "Soubhagya";
let anotherName = myName;
anotherName = "Hitesh";
// console.log(myName);
// console.log(anotherName);
let userOne = {
name: "Soubhagya",
upi: "abc@ybl",
mailId: "[email protected]"
}
let userTwo = userOne;
userTwo.upi = "cda@ybl";
console.log(userTwo);
console.log(userOne);