Wow! I've been going through Stack Overflow and MDN trying to find deeper explanations on this and so far yours is the best breakdown I've seen. The way you explained it definitely makes more sense. So using another example via your method..
26 % 8 = x
26 - (floor(26/8) * 8 = x
26 - (floor(3.25) * 8 = x
26 - (3 * 8) = x
26 - 24 = 2
Wow! I've been going through Stack Overflow and MDN trying to find deeper explanations on this and so far yours is the best breakdown I've seen. The way you explained it definitely makes more sense. So using another example via your method..
26 % 8 = x
26 - (floor(26/8) * 8 = x
26 - (floor(3.25) * 8 = x
26 - (3 * 8) = x
26 - 24 = 2
Is that correct?
Thank you so much for your help!
Yep that's correct, well done 🙂
Glad I could help.