-
Notifications
You must be signed in to change notification settings - Fork 0
/
JSES6-01
77 lines (53 loc) · 1003 Bytes
/
JSES6-01
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
75
76
let age = 30;
if (true) {
let age = 17;
console.log(age);
}
console.log(age);
console.log("<-------------->*");
const AGES = [10,21,46];
AGES.push(39);
console.log(AGES);
AGES[2] = 200;
console.log(AGES);
console.log("<-------------->*");
const OBJ = {
age: 33,
}
OBJ.age = 55;
console.log(OBJ)
console.log("<-------------->*");
function ABC () {
console.log("Hello")
}
ABC();
console.log("<-------------->*");
var ABC2 = () => {
console.log("Hello")
}
ABC2();
console.log("<-------------->*");
var ABC3 = () => console.log("Hello");
ABC3();
console.log("<-------------->*");
function ABC4 () {
return "Hi there";
}
ABC4();
console.log("<-------------->*");
var ABC5 = () => "Hi there";
ABC5();
console.log("<-------------->*");
var XXX = () => {
let a=2;
let b=3;
return a + b;
}
XXX();
console.log("<-------------->*");
var XXX1 = (a,b) => a + b;
XXX1(4,7);
console.log("<-------------->*");
var XXX2 = a => a+4;
XXX2(5);
console.log("<-------------->*");