O'Reilly logo

MooTools 1.3 Cookbook by Jay Larry G. Johnston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required