ok forget the word "hash" i dont know why i called it that. for some
reason i thought you call something like this a hash:
{name:"mike",age:"12",gender:"male"}
it's stores data like an array, with key names and values. name would
be the key name and "mike" would be the value.
what do you call it? JSON? i just thought JSON was a pretty new term,
and there was a name for it before JSON.
what ever its called... how would i pass something like that as a
function parameter.
how would the function have to be written?
On Aug 13, 9:22 pm, Lee <REM0VElbspamt...@cox.netwrote:
giloosh said:
can i pass a hash as a function parameter. ive seen it been used
before but i can't figure out how to do it.
i would like to call a function like this for example
doSomething({variable1:"blabla",variable2:"blabla" });
how would function doSomething be written for this to work.
I would also like the hash to be optional and the variables in the
hash to be optional.
meaning i should also be able to call doSomething(); with no variables
in it.
Judging by the fact that you have an example of the calling
syntax but don't know what to do with it, and that you also
don't know how to use the SHIFT key, I'm betting that you're
a particularly slow student and that this is a class assignment.
--