Files
freeCodeCamp/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.md
2022-10-18 12:59:49 +05:30

1.5 KiB
Raw Blame History

id, title, challengeType, videoUrl, forumTopicId, dashedName
id title challengeType videoUrl forumTopicId dashedName
cf1391c1c11feddfaeb4bdef Створення десяткових чисел з JavaScript 1 https://scrimba.com/c/ca8GEuW 16826 create-decimal-numbers-with-javascript

--description--

Ми можемо зберігати десяткові числа також і у змінних. Десяткові числа іноді називаються числами floating point або floats.

Note: when you compute numbers, they are computed with finite precision. Operations using floating points may lead to different results than the desired outcome. If you are getting one of these results, open a topic on the freeCodeCamp forum.

--instructions--

Створіть змінну myDecimal і надайте їй десяткове значення з дробовою частиною (наприклад, 5.7).

--hints--

myDecimal повинне бути числом.

assert(typeof myDecimal === 'number');

myDecimal повинне мати десяткову кому

assert(myDecimal % 1 != 0);

--seed--

--after-user-code--

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

--seed-contents--

const ourDecimal = 5.7;

// Only change code below this line

--solutions--

const myDecimal = 9.9;