Ok, so I'm currently writing a little snippet to sort variable. It's not very useful though, so I'll only kept it as a snippet and were building on it to build more larger code than this.
What I want to ask is.. when I enter this :
It would only pushes 'Hitsu' to the arr variable, because there's only one parameter exist in the function.
So, what'd I want to ask is, how can I allow one parameter to contain more than one arguments? Like my case above.
Thanks for your answer.
- Code:
function sortVar(variable) {
arr = [];
arr.push(variable);
}
What I want to ask is.. when I enter this :
- Code:
var hitsu = "Hitsu";
var wasgreat = hitsu + " was great";
sortVar(hitsu, wasgreat);
It would only pushes 'Hitsu' to the arr variable, because there's only one parameter exist in the function.
So, what'd I want to ask is, how can I allow one parameter to contain more than one arguments? Like my case above.
Thanks for your answer.