In what practical way would you likely use modulo?


#1

I like to think about putting things to practical use when I learn them. What instance would you most likely use modulo for? For example if you're creating a website with JS?


#2

It's not one of those things you use often enough to remember what you used it for lol :slightly_smiling: .
I know I've used it and it has been helpful, can't remember what though.
You probably won't use a modulo in a website.. unless it is math intensive to create some cool affect I suppose.

I feel like I've used modules to sort arrays. Like if the array contains a value that is even accept it and print it out else do nothing.

Oh, and if you decide to dive into ruby on rails you will be using erb alot which has alot of modules, not for the purpose you are probably expecting though :sunny: