-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
85 lines (51 loc) · 1.09 KB
/
script.js
File metadata and controls
85 lines (51 loc) · 1.09 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
let num = 20;
function showFirstMessage(text){
console.log(text);
let num = 201;
console.log(num);
}
showFirstMessage("Hello world!");
console.log(num);
// function calc(a,b) {
// return(a+b);
// }
// console.log(calc(4,3));
// console.log(calc(5,6));
// console.log(calc(10,6));
function ret(){
let num = 50;
return num;
}
const anotherNum = ret();
console.log(anotherNum);
const logger = function() {
console.log("hello") ;
};
logger();
// const calc =(a,b) => {return a = b} ;
// const usdCurr=28;
// const euroCurr=32;
// function convert (amount,curr) {
// console.log(curr * amount);
// }
// convert(500,usdCurr);
// convert(500,euroCurr);
const usdCurr=28;
const discount = 0.9;
function convert (amount,curr) {
return curr * amount;
}
function promotion(result){
console.log(result * discount);
}
promotion(convert(500,usdCurr));
function test() {
for (let i =0; i <5; i++) {
console.log(i);
if (i === 3) return
}
console.log("Done");
}
test();
function doNothing(){};
console.log(doNothing() === undefined);