Costruttore di data JavaScript
Esempio
Ottieni il costruttore Date:
const d = new Date();
let text = d.constructor;
Definizione e utilizzo
La constructor
proprietà restituisce la funzione che ha creato il prototipo Date.
Per le date JavaScript la constructor
proprietà restituisce:
funzione Data() { [codice nativo] }
Sintassi
Date.constructor
Valore di ritorno
funzione Data() { [codice nativo] } |
Supporto browser
constructor
è una funzione ECMAScript1 (ES1).
ES1 (JavaScript 1997) è completamente supportato in tutti i browser:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |