Math and the modulo


#1

Help me. When i write the modulo for 14 / 3 i write it in the console:

// console.log(14 % 3)

Am i writing it wrong or something??


#3

I removed the // but not working still. The answer i get is:

Oops, try again. It looks like the second console.log() isn't quite right.

Whats happening??


#4

I only see one console.log in your code. It might help if you showed us all of your code.


#5

Ok this is what i wrote:

// Below is an example of printing the remainder of 18/4 using modulo:
console.log(18 % 4);
console.log(14 % 3);
console.log(99 % 8);
console.log(11 % 3);


#6

It is just confused because you uncommented the example.


#7

So how do i solve it?


#8

Make that line a comment again:

// console.log(18 % 4);

#9

Ok I'll try that solution. Thank you


#10

It worked! Thank you!!


#11

I dont understand,,Can someone please help me


#12

I'm getting this message when I click submit...Oops, try again. Did you console.log() the result of 14 % 3 ?


#13

Can i see what you wrote in the console?


#14

wow no longer have access to what I was doing..its lost


#15

A post was split to a new topic: Math and the Modulo -- That's what I wrote and it said the same thing


#16

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.