Build a Mathbot - Step 7

Tell us what’s happening:

I dont understand why and what i am doing wrong. can someone please help me

Your code so far

const botName = "MathBot";
const greeting = `Hi there! My name is ${botName} and I am here to teach you about the Math object!`;

console.log(greeting);

console.log("The Math.random() method returns a pseudo random number between 0 and less than 1.");

const randomNum = Math.random();
console.log(randomNum);

console.log("Now, generate a random number between two values.");

const min = 1;
const max = 100;

const randomNum2 = Math.random() * (max - min) + min;
console.log(randomNum2);

console.log("The Math.floor() method rounds the value down to the nearest whole integer.");

// User Editable Region

const price = 6.7;
let numRoundedDown 0;

// User Editable Region

Your browser information:

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

Challenge Information:

Build a Mathbot - Step 7

Hi @lulugambino

SyntaxError: unknown: Missing semicolon. (24:18)

  22 |
  23 | const price = 6.7;
> 24 | let numRoundedDown 0;
     |                   ^
  25 |
  26 | // User Editable Region

In the console the message is displaying a syntax error.
This is stopping the execution of the code.

Happy coding

1 Like

okay thank you. now that ive fixed that problem. it is now saying this: The error message keeps saying, " You should not hardcode the value of 6 for the numRoundedDown variable.

For this step you are not asked to create the price variable.

Read the last console log on how to round a number.