0

Why is it 1.

function test(a,b=0, c =2) { return a/b/c } console.log(test(2,1));

21st Sep 2019, 10:16 AM
Oladayo Ahmod
Oladayo Ahmod - avatar
1 Odpowiedź
+ 7
Because in test(2,1) a is 2 b is 1 c is 2 2/1/2=(2/1)/2 =2/2 =1
21st Sep 2019, 11:04 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar