--- id: cf1391c1c11feddfaeb4bdef title: Create Decimal Numbers with JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/ca8GEuW' forumTopicId: 16826 --- ## Description
We can store decimal numbers in variables too. Decimal numbers are sometimes referred to as floating point numbers or floats. Note
Not all real numbers can accurately be represented in floating point. This can lead to rounding errors. Details Here.
## Instructions
Create a variable myDecimal and give it a decimal value with a fractional part (e.g. 5.7).
## Tests
```yml tests: - text: myDecimal should be a number. testString: assert(typeof myDecimal === "number"); - text: myDecimal should have a decimal point testString: assert(myDecimal % 1 != 0); ```
## Challenge Seed
```js var ourDecimal = 5.7; // Only change code below this line ```
### After Test
```js (function(){if(typeof myDecimal !== "undefined"){return myDecimal;}})(); ```
## Solution
```js var myDecimal = 9.9; ```