-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatatype.js
67 lines (34 loc) · 990 Bytes
/
datatype.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
// data type js
// number,sting,undefine,null,bigint,symbol.
// primitive data number
let salary = 43000; // number data type
console.log(salary);
let fullName = "vaibhav gund"; // string data type
console.log(fullName);
isFollow = true; // boolean data type
console.log(isFollow);
let x; // undefine data type
console.log(x);
x = null;
console.log(x); // null data type or object
// x = bigint("1234");
// console.log(x); // bigint data type
let y = Symbol("hello"); // Symbol data type
console.log(y);
// non primitive data type.
// object = arrays,function.
// create a object
// OBJECT IS collection of different variable
const student = {
fullName:"om kanawade",
age : 19,
sgpa : 9.0,
isPass:true,
};
// this is a student object
console.log(student.age);
// or
console.log(student);
// how to update values
student["age"] = student["age"]+1;
student["sgpa"] = student["sgpa"]+0.2;