0

i can't understand this operator in javascript yet %

4th Oct 2020, 1:46 PM
Youssef Ashraf
Youssef Ashraf - avatar
6 Respostas
+ 8
It's the remainder you get when you divide 24%5=4
5th Oct 2020, 10:04 PM
Jhonny
Jhonny - avatar
+ 6
It returns remainder ,5/3=>2
4th Oct 2020, 1:49 PM
Abhay
Abhay - avatar
+ 3
Youssef Ashraf yes u r correct
4th Oct 2020, 3:24 PM
maf
maf - avatar
+ 2
So it gets the remainig value after a division so 6/2 =0?
4th Oct 2020, 2:41 PM
Youssef Ashraf
Youssef Ashraf - avatar
+ 2
Thank you all I think I got it
5th Oct 2020, 10:10 PM
Youssef Ashraf
Youssef Ashraf - avatar
+ 1
Jhonny so we get the nearest number that can be divided without a fraction and subtract the number from it as this example 20 is the nearest divisible number and 24-20=4 so the answer would be 4
5th Oct 2020, 10:08 PM
Youssef Ashraf
Youssef Ashraf - avatar