Basic JavaScript - Finding a Remainder in JavaScript

Tell us what’s happening:

Describe your issue in detail here.

  • You should use the % operator

Your code so far

const remainder = 2%;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Finding a Remainder in JavaScript

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

you want to have the remainder of 11%3 as a value not just the answer which is 2.
Ex:

const sum = 5 + 5;

And not:

const sum = 10;

Tell us what’s happening:

Describe your issue in detail here. what am i doing wrong

  • Failed:The variable remainder should be initialized

  • Failed:The value of remainder should be 2

  • Failed:You should use the % operator

Your code so far

var reminder = 2 % 11 ; //var reminder 2;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Finding a Remainder in JavaScript

Why did you change to var? The original code used const and in general you shouldn’t use var.

1 Like

Set remainder equal to the remainder of 11 divided by 3 using the remainder (% ) operator.

Try to write this …