for i in [name, matches_total, matches_won, matches_lost]:
doSomething(i)
I tried doing this for JS but it did not work. Basically, I want it to do whatever it has to do over each of the variables. How do I do this with JS?
My attempt:
for (i in [name, matches_total, matches_won, matches_lost]){
doSomething(i);
}