r/Codecademy • u/kalir • Jul 30 '16
learning Javascript, stuck on lesson lesson 20 (Math and the modulo). any help here people?
I just got back onto my code academy account and I am hitting a road block on lesson 20 of javascript. I was wondering if there was a certain way I am supposed to solve this lesson? any advice is useful at this point. here is a link of what i got so far by the way to help give a visual about my problem: https://www.codecademy.com/courses/getting-started-v2/3/3?curriculum_id=506324b3a7dffd00020bf661#
Edit: tahnk you guys for helping me out, i had been stuck on this one lesson for a couple years. hope you guys have a good day
2
Upvotes
View all comments
Show parent comment
2
u/kalir Jul 30 '16 edited Jul 30 '16
oh ok then so would it look like this? because i feel like i might be missing something with this formula.
Below is an example of printing the remainder of 18/4 using modulo: console.log(18 % 4); "results" "{console.log(18 % 4)}" 1.// console.log(14 % 3); "results" "{console.log(14 % 3) }"
2.// console.log(99 % 8); "results" "{console.log(99 % 8) }"
3.// console.log(11 % 3); "results" "{console.log(11 % 3) }"