How could I find out all the function properties in JavaScript?
Here is what I tried:
var a = function(a, b, c) {};
a.length;
Object.keys(a);
So, the a
definitely has the length
property (with the value of 3
), but for some reasons there is no "length"
in the array produced by the Object.keys(a);
. Why? How could I see all the function properties? I am interested to know both personal and inherited (using the proto) properties.
I am interested in this purely due to desire to learn and explore the intricacies of JavaScript. I do not have any real world application for this knowledge right now.
Aucun commentaire:
Enregistrer un commentaire