Lets say I have this
anArray.filter(something)
//later
something(argumentno2)
function something(argument1, argument2) {
//do something with argument 1
//do something with argument 2
}
TDLR: Need to do work on the result of argument1 using argument2
My issue is that I don't receive the arguments in order, and my software seems to bug out as a result, argument 2 specially seems to return a number instead of its value, and most of the times returns nothing when its value is that of a string, I am not receiving the functions in order in my code, is there anyway to assign argument1 with the first slot and argument2 with the second, or at least a way to work around the problem, I hope this clarifies it somewhat, I am not too familiar with javascript terms, please ask questions if you need further elaboration.