Infinity is some number in javascript?
问题 alert(1/0) alerts Infinity and alert(1/-0) alerts -Infinity . alert(-1/-0) alerts Infinity , as I could expect when doing some operations with real numbers. I can't say that infinity is a measurable value. Does javascript think it is some number? 回答1: Yes, Infinity and -Infinity are special values of the Number type. From the ES5 spec: There are two other special values, called positive Infinity and negative Infinity. For brevity, these values are also referred to for expository purposes by