Basic JavaScript - Create Decimal Numbers with JavaScript

on creating decimal number with javascript, i cant seem to get around the solution. What do i do?

Your code so far
const ourDecimal = 5.7;

myDecimal = 5.7;

// Only change code below this line

const ourDecimal = 5.7;
myDecimal = 5.7;
// Only change code below this line

Your browser information:

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

Challenge: Basic JavaScript - Create Decimal Numbers with JavaScript

Link to the challenge:

Notice how the challenge variable is declaring the variable by using const? You are not declaring the variable with anything. Also looking at the code you posted. You can see the comment that says “only change code below this line” your code is above that line not below it. I would reset the lesson, and only change the code in the region the challenge gives you. Be sure to add a declaration at the beginning of your variable.

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