English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Objet Expression régulière RegExp JavaScript
constructorPropriété renvoyant une référence à la fonction de prototype de l'instance créée.
Pour JavaScript RegExp, la propriété constructor retourneFonction RegExp() {[code sur site]}.
Pour JavaScript Chaîne de caractères, la propriété constructor retourneFonction String() {[code sur site]}.
Pour JavaScript Numbers, la propriété constructor retourneFonction Number() {[code natif]}.
Pour JavaScript Date, la propriété constructor retourneFonction Date(){[code natif]}.
Pour JavaScript Boolean, la propriété constructor retourneFonction Boolean(){[code natif]}.
Pour JavaScript tableau, la propriété constructor retourneFonction Array(){[code natif]}.
regex.constructor
var regex = new RegExp("Parrot", "g"); regex.constructor;Vérifiez et voyez‹/›
Tous les navigateurs supportent complètement la propriété Constructor :
Propriétés | |||||
constructor | Oui | Oui | Oui | Oui | Oui |
Valeur de retour : | Retourne la fonction créant l'objet, c'est-à-direFonction RegExp(){[code natif]} |
---|---|
Version JavaScript : | ECMAScript 1 |