mardi 8 novembre 2016

Constant pattern in Javascript

How were implemened constants in javascript before ES5 was released?

There were no get/set stuff, no writable property, no const word, no Object.freeze stuff as far as I know, so how I could make my own constant, which can't be changed?

Like, as example, Math.PI

enter image description here

Aucun commentaire:

Enregistrer un commentaire