-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.js
More file actions
56 lines (38 loc) · 1.04 KB
/
functions.js
File metadata and controls
56 lines (38 loc) · 1.04 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
// function greet(name) {
// console.log("Hello " + name + " Welcome to JavaScript Full Course");
// }
// greet("Nikhil")
// function sum(a, b) {
// return a + b;
// }
// function multi(a, b) {
// console.log(a + b);
// }
// console.log(sum(10, 20));
// console.log(multi(10, 20));
// (function multi(a, b) {
// console.log(a + b);
// }(5,14) )
function Calculoter(A, B, Oper) {
switch (Oper) {
case "+":
console.log( `A And B Sum IS: ${A+B}` );
break;
case "-":
console.log( `A And B Sub IS: ${A-B}` );
break;
case "*":
console.log( `A And B mulit IS: ${A*B}` );
break;
case "/":
console.log( `A And B Division IS: ${A/B}` );
break;
default:
console.log("Opretor is bot found");
break;
}
}
Calculoter(10 , 20 , "+")
Calculoter(10 , 20 , "*")
Calculoter(10 , 20 , "-")
Calculoter(10 , 20 , "/")