Can I use the console to view the methods available for a JS object?
I am thinking of something like this:
> var myArray = [1,2,3]; undefined > myArray [1, 2, 3] > myArray.logme = function() { console.log(this); }; function () { console.log(this); } > myArray [1, 2, 3]
The second time I type myArray , I would like to see that the logme() method is now available.
I want to know the answer to make it easier to explore unfamiliar JS objects.
source share