This commit is contained in:
Karan 2021-11-25 19:52:19 +05:30 committed by GitHub
parent 0089f8848c
commit 0c58889b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +0,0 @@
const val1 = 10;
const val2 = 5;
let operat = "-";
console.log(cal(val1, val2, operat));
operat = "+";
console.log(cal(val1, val2, operat));
function cal(a, b, op) {
if (op == "-") {
return a - b;
} else {
return a + b;
}
}