-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.js
More file actions
62 lines (42 loc) · 1.13 KB
/
Example.js
File metadata and controls
62 lines (42 loc) · 1.13 KB
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
// var city = "London";
// let country = "UK";
// const pi = 3.14;
// // console.log(city);
// let obj = {name:"Raju"}
// console.log(obj.name)
// let attendence = 60 + 5;
// let eligibleForExam = (attendence >= 75);
// console.log("Eligible for exam: ",eligibleForExam);
// function greetStudent(name){
// console.log("Hello",name);
// }
// console.log(greetStudent("Dhanush"));
// let today = new Date();
// console.log(today);
// let arr = ['Nayan','Raju','Dhanush','Sanjay'];
// arr.push('Mahesh');//Add at last
// arr.unshift("Amit");//Add at first
// console.log(arr);
// arr.splice(2,1);//Replace
// console.log(arr);
// arr.pop();//Remove last
// console.log(arr);
// arr.pop("Nayan");
// console.log(arr);
// arr.shift();//Remove first
// console.log(arr);
// for(let ele of arr){
// console.log(ele);
// }
// console.log("Do..While loop");
// let i = 0;
// do {
// console.log(arr[i]);
// i++;
// }while (i < arr.length
//);
let x = new Map();
x.set("101",{name:"Raju",dept:"CSE"});
x.set("102",{name:"Ram",dept:"CSE"});
x.set("103",{name:"Rajesh",dept:"CSE"});
console.log("Student 101:",x.get("101").name);