Kaynağa Gözat

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

stas.vladlenko 1 yıl önce
ebeveyn
işleme
e8b76afcfb
1 değiştirilmiş dosya ile 1 ekleme ve 4 silme
  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)