Fundamentals: Return
Tue Oct 04 2022 09:49:49 GMT+0000 (Coordinated Universal Time)
Saved by
@j_jivan
#javascript
/*
Make multiple functions that will return the sum, difference, modulus, product, quotient, and the exponent respectively.
Please use the following function names:
addition = add
multiply = multiply
division = divide (both integer and float divisions are accepted)
modulus = mod
exponential = exponent
subtraction = subt
Note: All math operations will be: a (operation) b
*/
function add(a,b){
return a + b;
}
function divide(a,b){
return a / b;
}
function multiply(a,b){
return a * b;
}
function mod(a,b){
return a % b;
}
function exponent(a,b){
return a ** b;
}
function subt(a,b){
return a - b;
}
content_copyCOPY
https://www.codewars.com/kata/55a5befdf16499bffb00007b/train/javascript
Comments