过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Number.toInteger()
method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.
If the target value is
NaN
,
null
or
undefined
, 0 is returned. If the target value is
false
, 0 is returned and if
true
, 1 is returned.
Number.toInteger(number)
number
The value to be converted to an integer.
toInteger
Number.toInteger(0.1); // 0 Number.toInteger(1); // 1 Number.toInteger(Math.PI); // 3 Number.toInteger(null); // 0
Not part of any standard.
Number.toInteger()
was part of the draft ECMAScript 6 specification, but has been removed on August 23, 2013 in Draft Rev 17.
Not supported anywhere. Historically supported in Firefox 16 till 31.
Archive
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.unwatch()
Object.prototype.valueOf()
Object.prototype.watch()
Object.setPrototypeOf()