JavaScript46 javascript NaN. infinity isNaN(x) isNaN() checks its parameter "x" to see if it's the value "NaN" (not a number)- an illegal number. The function returns true if "x" is NaN, and false if not. A common example of NaN is 0 divided by 0. This function is required to detect NaN, as using equality operators (== or ===) won't do. isFinite(x) Determines whether a number is finite. Returns false if x is +infinity, -infinity, or.. 2010. 3. 2. javascript 소수점 반올림 소수점을 반올림 하는 방법은 Math의 round () 메소드를 사용하거나 기본 함수인 toFixed를 사용하여 소수점을 반올림한다. toFixed(반올림지점) var number = 3.555 alert(number.toFixed(2)); // 3.56 Math.round() var number = 3.99999999999; var result = Math.round(number); alert(result);// 4 2010. 3. 1. 이전 1 ··· 9 10 11 12 다음