just wanting to set up an array through my parameters. Check out this pseudocode bellow to see what I’m trying to do:
function someFunction(x = new Array()){
for (a in x){
some action with x[a];
}
}
someFunction([value a, value b, value c]);
So I’m trying to do something that may work similar to this. Thanks in advance guys!
That’s basically a special case of
each:though
eachis usually implemented as a method of Array, along withmap,filterandreduce/fold:Note that using
for (... in ...)with arrays can cause problems as it will pick up properties defined on an array in addition to the integer indices.