-Infinity 타입변환
<p id="demo"></p> <script> var x = -Infinity; document.getElementById("demo").innerHTML = "Number : " + Number(x) + "<br>" + "String : " + String(x) + "<br>" + "Boolean: " + Boolean(x); </script> 결과보기
<p id="demo"></p>
<script>
var x = -Infinity;
document.getElementById("demo").innerHTML =
"Number : " + Number(x) + "<br>" +
"String : " + String(x) + "<br>" +
"Boolean: " + Boolean(x);
</script>
결과보기
결과값:
Number : -Infinity
String : -Infinity
Boolean: true