+ 3

Who can explain a complex modulus for me? Like this. alert(Number(16/2+4) % 5);

alert(Number(16/2+4) % 5);

8th Sep 2019, 4:22 PM
Oladayo Ahmod
Oladayo Ahmod - avatar
2 Answers
+ 11
First priority is given to * , / ,% . Second priority is given to + , - . So according to this first you have to sol 16/2 =8. And then you have to sol brackets like this (8 + 4) = 12. At last you have sol 12%5 =2. Over all equation solution is this ((16 / 2 + 4) %5) =((8 + 4 ) % 5) =(12 % 5) =2
8th Sep 2019, 4:41 PM
Rohitman
Rohitman - avatar
+ 2
Thanks so much i have got it.... I thought the figures in the bracket were in this format 16 divided by 2+4 i. E 16/6 But i have got it now
8th Sep 2019, 4:35 PM
Oladayo Ahmod
Oladayo Ahmod - avatar