Why is it 1. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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