I'm not able to pass an index from an array to the 2nd argument of a window.setTimout()
function (https://www.w3schools.com/js/js_timing.asp)
function joueursCascade(){
for (i = 0; i <= my_params.nbJoueurs; i++) {
var del = tabDel[i]; c
function getName(){
message = new Paho.MQTT.Message(document.getElementById('btn3').value);
message.destinationName = document.getElementById('esp'+i).value+"/ledstate";
mon_client.send(message);
}
window.setTimeout(getName(), del);
}
}
called by something like joueursCascade()
this code should send "my_params.nbJoueurs"
strings via MQTT at "del"
time intervals.