반응형
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 NaN. JavaScript 1.3 statement. |
eval(s) | Evaluates the string ("s") and returns the results of the evaluation (if available). Eval() allows you to dynamically construct a JavaScript statement or expression. Examples:
eval("8+3+1") //returns 12
eval("alert(Math.random())") //alerts Math.random() |
NaN | 값이 없을때 혹은 숫자 이외것이.. isNaN[true, false반환] |
infinity | 표한알수 없는값 (소수 이하 길이...) isFinite[true, false반환] |
* http://www.javascriptkit.com/jsref/globalfunctions.shtml
* http://www.java2s.com/Tutorial/JavaScript/0160__Global/GlobalInfinity.htm
반응형
'JavaScript > script' 카테고리의 다른 글
DOM 으로 Table, DIV 생성 (0) | 2010.06.07 |
---|---|
DOM 으로 생성된 ChildNodes 삭제 하기. - removeChild (0) | 2010.06.07 |
Javascript 이전달 및 다음달 구하기 Ex) 5~6/6~7 (0) | 2010.06.07 |
SELECT OPTION 의 Value와 Text 값 (0) | 2010.03.17 |
javascript 소수점 반올림 (0) | 2010.03.01 |