-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
50 lines (43 loc) · 779 Bytes
/
script.js
File metadata and controls
50 lines (43 loc) · 779 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
console.log("Welcome to day 2");
/* Var Example
var a = 10;
a=20; //reassign
var a = 30; //redeclare
console.log(a);
*/
/*let example
let b =10;
b=30; //reassign
console.log(b);
*/
/*const example
const c = 10;
console.log(c);
*/
/*Window methods/events
alert("Click Ok to enter into the website")
let result = prompt("Enter your Name")
console.log(result)
let result1= confirm("Are you sure to enter the webiste")
console.log(result1);
*/
/*undefined example
let a;
console.log(a);
*/
/*null example
let num = null;
console.log(num);
console.log(typeof(num));
*/
/*Object Example
let person = {
firstname:"John",
lastname:"Doe",
age:35,
gender:"Male",
phonenumber:9876543210,
skills:["Javascript","HTML","CSS","Reactjs"]
}
console.log(person);
*/