Hello,

I'm wondering what is the best way to make sure an argument (or any
variable for that matter) is an Enumerable (eg an array) and turn it
into one if it's not. For the moment I'm using this solution:

function myFunc(a) {
  if(a.size === undefined) a = [a];
  ...
}

How would you do that?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to