Browse Source

Обновить 'HW#6/hw6.js'

stas.vladlenko 1 year ago
parent
commit
e8b76afcfb
1 changed files with 1 additions and 4 deletions
  1. 1 4
      HW#6/hw6.js

+ 1 - 4
HW#6/hw6.js

@@ -41,12 +41,9 @@ function sum3(firstNum,secondNum,thirdNum){
     if(thirdNum===undefined){
         thirdNum=0
     }
-    else if(secondNum===undefined){
+    if(secondNum===undefined){
         secondNum=0
     }
-    else if (thirdNum===undefined){
-        thirdNum=0
-    }
 
     result = (firstNum + secondNum + thirdNum)
     console.log(result)