변수에 십진수도 저장할 수 있습니다.
10 진수는 부동 소수점 숫자 또는 부동 소수점이라고도합니다.
모든 실수를 부동 소수점으로 정확하게 표현할 수있는 것은 아닙니다.
이로 인해 반올림 오류가 발생할 수 있습니다.
https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
Floating-point arithmetic - Wikipedia
From Wikipedia, the free encyclopedia Jump to navigation Jump to search Computer format for representing real numbers This article is about the method of representing a number. For the album, see Floating Point. An early electromechanical programmable comp
en.wikipedia.org
Q>
1. myDecimal 변수를 만들고 소수 부분이있는 10 진수 값 (예 : 5.7)을 제공합니다.
2. myDecimal은 숫자 여야합니다.
3. myDecimal에는 소수점이 있어야합니다.
A>
var ourDecimal = 5.7;
// Only change code below this line
var myDecimal = 5.7;
freeCodeCamp.org
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
www.freecodecamp.org
'Python_WEB > JavaScript' 카테고리의 다른 글
[freecodecamp]JavaScript 하나의 소수를 다른 소수로 나누기 (0) | 2020.10.15 |
---|---|
[freecodecamp]JavaScript 두 개의 소수 곱하기 (0) | 2020.10.15 |
[freecodecamp]JavaScript 숫자 줄이기 (0) | 2020.10.15 |
[freecodecamp]JavaScript 숫자 늘리기 (0) | 2020.10.15 |
[freecodecamp]JavaScript 한 숫자를 다른 숫자로 나누기 (0) | 2020.10.15 |