+ 1

Could anybody make me understand why this code is answering 72? |

var a = '7'; var b = '9'; alert(a + b % 7);

18th Mar 2023, 12:06 PM
Dinesh Pal :)
Dinesh Pal :) - avatar
2 ответов
+ 5
Dinesh Pal :) , first is modulo division 9%7=>2. Then string concatenation "7" + 2 => "72".
18th Mar 2023, 12:19 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
Thanks Bro :-)
18th Mar 2023, 12:46 PM
Dinesh Pal :)
Dinesh Pal :) - avatar