Update calculator.js

This commit is contained in:
Mayar-Hassanin98 2020-07-25 16:44:00 +02:00 committed by GitHub
parent 888383a44e
commit e75a7da978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 20 deletions

View File

@ -1,25 +1,36 @@
function add () { function add (a,b) {
return a+b;
}
function subtract (a,b) {
return a-b;
}
function sum (a) {
let sum=0
if(a){
sum+=a;
}
return sum;
}
function multiply (a,b) {
return a*b;
}
function power(a,b) {
return Math.pow(a,b)
} }
function subtract () { function factorial(a) {
if(a==o)return;
} let fact=1;
for(let i=n ;i<0 ;i--)
function sum () { {
fact*=1;
} }
return fact;
function multiply () {
}
function power() {
}
function factorial() {
} }
module.exports = { module.exports = {