removed redundant comments
This commit is contained in:
parent
a136f06af8
commit
367e9405dd
|
@ -1,22 +1,8 @@
|
||||||
/*function greater(num1, num2){
|
|
||||||
if(num1 > num2){
|
|
||||||
return num1;
|
|
||||||
} else if(num2 > num1){
|
|
||||||
return num2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function least(num1, num2){
|
|
||||||
if(num1 < num2){
|
|
||||||
return num1;
|
|
||||||
} else if(num2 < num1){
|
|
||||||
return num2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
const sumAll = function(num1, num2) {
|
const sumAll = function(num1, num2) {
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
|
|
||||||
if( Math.sign(num1 || num2) !== -1 && typeof(num1 && num2) === "number" ){
|
if( Math.sign(num1 || num2) !== -1 && typeof(num1 && num2) === "number" ){
|
||||||
|
|
||||||
const least = (num1,num2) =>{
|
const least = (num1,num2) =>{
|
||||||
if(num1 < num2){
|
if(num1 < num2){
|
||||||
return num1;
|
return num1;
|
||||||
|
@ -40,6 +26,8 @@ const sumAll = function(num1, num2) {
|
||||||
} else{
|
} else{
|
||||||
return "ERROR";
|
return "ERROR";
|
||||||
}};
|
}};
|
||||||
|
|
||||||
console.log(sumAll(1, 4));
|
console.log(sumAll(1, 4));
|
||||||
|
|
||||||
// Do not edit below this line
|
// Do not edit below this line
|
||||||
module.exports = sumAll;
|
module.exports = sumAll;
|
||||||
|
|
Loading…
Reference in New Issue