0
I don't understand the % mark and the array thing. Please, someone explain to me.
its because in challenges, i always get defeated in the array amd % section!
4 Respostas
+ 7
% is the modulus operator. It returns the remainder of an expression after division. E.g.
5%2 // outputs 1
4%2 // outputs 0
2%4 // outputs 2
+ 4
i think i understood it the % devides a certain number eg 5%3 and 3 goes once into 5, and the remaining number is 2. that's the %'s use! but u guys xan also give me more info
0
You have 10 apples and you have to divide them among 3 kids. After giving three apples to each kid, you have one left over. This left over is modulus.
And it's mathematical expression is 10%3 = 1.
If you have nothing left over, the answer will be 0.
Now tell me, 100%7=what?
0
% is called the modulo operator
it gives you the remainder