Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / October 2005



Tip: Looking for answers? Try searching our database.

Understand this!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
add - 31 Oct 2005 03:43 GMT
Can someone explain how this works? Thanks!

ProcessData( DataArray )
{

 TheData = DataArray || [];
...
}

ProcessData(["Item1", "Item2", "Item3", "Item4"]);
Randy Webb - 31 Oct 2005 04:15 GMT
add said the following on 10/30/2005 9:43 PM:

> Can someone explain how this works? Thanks!
>
> ProcessData( DataArray )

That's a syntax error. It should be:

function ProcessData( DataArray)

Or:

myVar = ProcessDate( DataArray)

> {
>
>   TheData = DataArray || [];

It checks to see if DataArray is an array. If it is, it sets TheData =
to that array. If not, it sets TheData to an empty array.

Signature

Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.