forked from Minskoleopc/javascript830B
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script3.js
82 lines (57 loc) · 1.06 KB
/
script3.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// // let and const
// let a = 10
// console.log(a)
// a = 300
// console.log(a)
// const h = 100
// console.log(h)
// //h = 1000
// // program 2
// let s = 10
// let t = 5
// console.log(s+t)
// console.log(s-t)
// console.log(s*t)
// console.log(s/t)
// console.log(s%t)
// let a1 = 8
// let b1 = 4
// console.log(a1 + b1)
// console.log(a1 - b1)
// console.log(a1 * b1)
// console.log(a1 / b1)
// console.log(a1 % b1)
// // 10 pair ----- 50 lines
// function Calculator(x,y){
// console.log(x+y)
// console.log(x-y)
// console.log(x*y)
// console.log(x/y)
// console.log(x%y)
// }
// Calculator(12,4)
// Calculator(8,4)
// Calculator(4,2)
// Day 2
// function without parameter and without return type
function add(){
console.log(9+9)
}
add()
add()
add()
add()
add()
// function with parameter and without return type
function addB(x,y){
console.log(x+y)
}
addB(124,4)
addB(12,4)
// function with parameter and function with return type
function addC(x,y){
return x + y
}
let a = addC(12,4)
console.log(a)
console.log(a+a)