Build a Mathbot

Can Someone help me with this problem

As you learned in previous lessons, the Math.floor() method rounds the value down to the nearest whole integer.

Example Code
const price = 10.99;
Math.floor(price); // 10

Create a variable called numRoundedDown and assign it the result of rounding the floating point number 6.7 down to the nearest whole integer.

Then, log the numRoundedDown variable to the console to see the result.

const numRoundedDown = Math.floor(6.7);

console.log(numRoundedDown);

Your code looks fine. Is it possible you changed something in the starting code? That would cause the tests to fail. You may want to reset this step and try again.


In the future, if you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge.

The Help 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.