-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatatypes-summary.js
59 lines (40 loc) · 1.01 KB
/
datatypes-summary.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
56
57
58
59
//primitive
//7 type of data: string, number, boolean, null(empty), undefiened(space), symbol, BigInt
const score =100;
const scoreVal =100.3
const isloggein=true;
const outsidetemp = null // (Completely empty)
let user;//(undefiened)
const id = Symbol('123')
const anotherId = Symbol('123')
console.log(id === anotherId)
const bignumber = 284664547139436187n
//Reference type / non primitive
// array, objects, functions
const heros = ["shaktiman", "doga"]
let myobj = {
name:"aachal",
age: 23,
}
const myfunction= function()
{
console.log("hello")
}
console.log(typeof bigNumber);
//// https://262.ecma-international.org/5.1/#sec-11.4.3
//************************/
//stack (primitive) copy , heap (non-primitive) reference
let myyoutubename = "codestation"
let anothername = "thecodinggeeks"
console.log(myyoutubename);
console.log(anothername);
let userone ={
email: "userone",
upi:"user@ybl"
}
let usertwo = {
email:"usertwo",
upi:"two@ybl"
}
console.log(userone)
console.log(usertwo);