-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02_datatypes.js
77 lines (49 loc) · 1.29 KB
/
02_datatypes.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// // "use strict";
// // // alert(5+5)
// // //code readibility==>
// // console.log("yadnyesh");
// // console.log("yadnyesh")
// // //string==>""
// // console.log("yadnyesh")
// // console.log('yadnyesh')
// // console.log(5 +
// // 5
// // )
// //primitive and non-primitive
// //primitive datatypes
// //weeekly typed
// let num = 5
// console.log(num + "1")
// console.log(typeof(num+"1"))
// //Number==>2 to the power 53
// let num1 = 5
// const num3 = 9.23
// console.log(typeof num1, typeof num3)
// //String
// let str = "Yandyesh"
// const str2 = 'Khotre'
// console.log(typeof str, typeof str2);
// //Boolean==> haa ya naa// true or false// 0 or 1
// let bool = false
// let bool2 = true
// console.log(typeof bool, typeof bool)
// //Symbol==> unqiueness find
// const symbol = Symbol("age")
// console.log(typeof symbol);
// //BigInt
// const bigInt = 745738938973477349999999n
// console.log(typeof bigInt);
// //undefined
// let undefined
// console.log(typeof undefined);
// //null==>khali yafir empty
// let number = null;
// console.log(typeof number);//object
//conversion
const age = Number("20")
// console.log(typeof age);
const random = null
const randomToNumber = Number(random)
// console.log(randomToNumber);
const num1 = Number("123abe")
console.log(num1)