-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchap1.js
More file actions
54 lines (44 loc) · 966 Bytes
/
chap1.js
File metadata and controls
54 lines (44 loc) · 966 Bytes
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
// console.log("Hello world","Madhav",21,"MCA");
// let a=10;
// var b=20;
// const c=30;
// console.log(a,b,c);
// Primitive data types
/*
let d=1;
let e="Madhav";
let f=true;
let g=undefined;
let h=null;
let i=BigInt(4729729429478284);
let j=Symbol("heyy");
console.log(d,e,f,g,h,i,j);
console.log(typeof d, typeof e, typeof f, typeof g, typeof h, typeof i, typeof j);
*/
//Non-pritive data type
/*
let person={
fname:'Madhav',
lname:'Gupta',
age:21,
isMarried:false
}
person.age=22; // to update values of item in object
person.college="Tula's Institute"; // to add item in object
console.log(person);
console.log(person.age); // to print specific value of object
*/
//implicit type conversion :- Type coercion
/*
console.log(35+"mg");
console.log(35+"23");
console.log(typeof (35+"mg"));
*/
//explicit type conversion:- Type casting
/*
let a=10;
let s=String(a);
console.log(typeof a);
console.log(typeof s);
*/
//Chapter 1 completed