Basic JavaScript - Finding a Remainder in JavaScript

I’m pretty confused on what exactly its asking? The variable should be initialized, which it is (check below)
I’m using the % as the operator but for some reason I’m not showing the value remainder to be 2, how?

Your code so far

const remainder = 0;
remainder = 11 % 3;
print("The value of remainder is 2.")

Your browser information:

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

Challenge: Basic JavaScript - Finding a Remainder in JavaScript

Link to the challenge:

They asked to “set the value of the remainder variable,” so instead of re-assigning it, maybe they want you to change the value of the original remainder variable declaration, in place.

Welcome to the forum.
If you try changing the const remainder to a var remainder and to the value remainder of 2, and complete the instructions as you have done, you should pass it. Happy coding.

You use % to get remainders

1 Like

I tried it with copy and paste still doesn’t work

If you have a question about a specific challenge as it relates to your written code for that challenge need some help, click the Ask for Help button. This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Keep it simple… just delete the zero and set const remainder=11%3;

it’s a const… so you can’t re-assign it!