Understanding Decimals

Tell us what’s happening:

Your code so far


var ourDecimal = 5.7;

// Only change code below this line

var ourDecimal = 2.7

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Create Decimal Numbers with JavaScript

Link to the challenge:

Why does 2.7 not work when there is a number and decimal?
Thank you so much!

You haven’t given your variable the correct name: go over the instructions again, it asks you to call it something other than what you’ve written

1 Like