/ Published in: JavaScript
This comes in handy when working in big objects and you need to see what's happening on the inside of an instance.
I aliased 'console.log' to 'put' and wrapped it in a try/catch block that throws alerts if no console is available. Less typing - and mildly rubyish.
I got the logAllMembers bit from a mailing list archived message - forget the author but props to them. Only alteration I made was to skip null members in the output.
I aliased 'console.log' to 'put' and wrapped it in a try/catch block that throws alerts if no console is available. Less typing - and mildly rubyish.
I got the logAllMembers bit from a mailing list archived message - forget the author but props to them. Only alteration I made was to skip null members in the output.