I want to iterate over the methods of a javascript Date object. The first attempt did not work:
var date = new Date();
for (var key in date) {
console.log(key);
}
I've tried a few related things -- Object.keys
, for example. So far I have not found a way to do it.
Aucun commentaire:
Enregistrer un commentaire