Is there any way I can use the console to see the methods available on a JS object?
I'm 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 the fact that the logme()
method is now available.
I want to know the answer in order to explore unfamiliar JS objects more easily.