A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Number/Number below:

Constructeur Number() - JavaScript | MDN

MDN Web Docs
  1. Technologies web pour développeurs
  2. JavaScript
  3. Référence JavaScript
  4. Objets globaux
  5. Number
  6. Constructeur Number()

Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez également contribuer en rejoignant la communauté francophone sur MDN Web Docs.

Filter sidebar

Dans cet article
  1. Objets globaux
  2. Number
  3. Constructeur
    1. Constructeur Number()
  4. Méthodes statiques
    1. Number.isFinite()
    2. Number.isInteger()
    3. Number.isNaN()
    4. Number.isSafeInteger()
    5. Number.parseFloat()
    6. Number.parseInt()
  5. Propriétés statiques
    1. Number.EPSILON
    2. Number.MAX_SAFE_INTEGER
    3. Number.MAX_VALUE
    4. Number.MIN_SAFE_INTEGER
    5. Number.MIN_VALUE
    6. Number.NaN
    7. Number.NEGATIVE_INFINITY
    8. Number.POSITIVE_INFINITY
  6. Méthodes d'instance
    1. Number.prototype.toExponential()
    2. Number.prototype.toFixed()
    3. Number.prototype.toLocaleString()
    4. Number.prototype.toPrecision()
    5. Number.prototype.toString()
    6. Number.prototype.valueOf()
  7. Héritage
  8. Object/Function
  9. Méthodes statiques
    1. Function.prototype.apply()
    2. Function.prototype.bind()
    3. Function.prototype.call()
    4. Function.prototype.toString()
    5. [Symbol.hasInstance]()
  10. Propriétés statiques
    1. Function.displayName Non standard
    2. Function.length
    3. Function.name
    4. Function
    5. Function.arguments Non standard Obsolète
    6. Function.caller Non standard Obsolète
  11. Méthodes d'instance
    1. Object.prototype.__defineGetter__() Obsolète
    2. Object.prototype.__defineSetter__() Obsolète
    3. Object.prototype.__lookupGetter__() Obsolète
    4. Object.prototype.__lookupSetter__() Obsolète
    5. Object.prototype.hasOwnProperty()
    6. Object.prototype.isPrototypeOf()
    7. Object.prototype.propertyIsEnumerable()
    8. Object.prototype.toLocaleString()
    9. Object.prototype.toString()
    10. Object.prototype.valueOf()
  12. Propriétés d'instance
    1. Object.prototype.__proto__ Obsolète
    2. Object.prototype.constructor
Dans cet article Constructeur Number()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Le constructeur Number() permet de créer un objet Number.

Syntaxe

js

new Number(valeur);
Paramètres
valeur

La valeur numérique de l'objet à créer.

Exemples Créer des objets Number

js

const a = new Number("123"); // a === 123 vaut false
const b = Number("123"); // b === 123 vaut true
a instanceof Number; // true
b instanceof Number; // false
Spécifications Specification ECMAScript® 2026 Language Specification
# sec-number-constructor
Compatibilité des navigateurs Voir aussi Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on 3 août 2023 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4