April 13, 2020
js – 1 | function addition()
function add( a, b ) {
return a + b ;
}
const addition = (a, b) => a + b;
function addition(a, b) {
if (typeof a !== "number" || typeof b !== "number") {
return "Sorry but you didn't pass two numbers.";
}
return a + b;
}