I am trying to pass a string variable and two arrays to a global function. Something like this:
function send_times_to_device(stop_name, times, headsigns) {
// function code here
}
Later in code:
...
var stop_name = "temp";
var times = new Array(json.length);
var headsigns = new Array(json.length);
...
if(times.length < 6){
send_times_to_device(stop_name, times, headsigns);
}
...
How would I do this correctly in Javascript?
Thanks in advance!
EDIT: You guys were right, there was an error elsewhere in my code, this works!