Viewing the members of an ARRAY using three different methods

When the contents of a smaller array get confusing, alert messages may do the trick. If creating an element in the DOM to hold the output suits the project, that method is quick and easy, too. Finally, most advanced developers log this kind of output to the console, which is viewable, for one, from within Firefox's Firebug console panel.

Wrap the function in Window.addEvent('load'),function() { ... } so that it fires after the page completely loads.

How to do it...

Create a small array for testing. Then loop over it. Three methods are shown; only one is needed for troubleshooting. Choose one that suits personal taste and the project. For instance, a live site will only be able to accommodate ...

Get MooTools 1.3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.