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.
- The value to be converted to an integer.
Number.toInteger(0.1); // 0 Number.toInteger(1); // 1 Number.toInteger(Math.PI); // 3 Number.toInteger(null); // 0
Number.toInteger() was part of the draft ECMAScript 6 specification, but has been removed on August 23, 2013 in Draft Rev 17.
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
|Basic Support||(No)||16 — 32||(No)||(No)||(No)||(No)|
|Feature||Android||Chrome for Android||Edge mobile||Firefox for Android||IE mobile||Opera Android||iOS Safari|
|Basic Support||(No)||(No)||(No)||16 — 32||(No)||(No)||(No)|