Randell Dawson e9212c61d2 fix(curriculum): Remove unnecessary assert message argument from English challenges JavaScript Algorithms and Data Structures - 01 (#36401)
* fix: rm assert msg basic-javascript

* fix: removed more assert msg args

* fix: fixed verbiage

Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com>
2019-07-13 08:07:53 +01:00

1.4 KiB

id, title, challengeType, videoUrl
id title challengeType videoUrl
cf1391c1c11feddfaeb4bdef Create Decimal Numbers with JavaScript 1 https://scrimba.com/c/ca8GEuW

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

tests:
  - text: <code>myDecimal</code> should be a number.
    testString: assert(typeof myDecimal === "number");
  - text: <code>myDecimal</code> should have a decimal point
    testString: assert(myDecimal % 1 != 0);

Challenge Seed

var ourDecimal = 5.7;

// Only change code below this line


After Test

(function(){if(typeof myDecimal !== "undefined"){return myDecimal;}})();

Solution

var myDecimal = 9.9;