var h =100; var t =100; while ((h<=0) || (t<=0)) { ... цикл операции на уменьшение значение h или t... } else if (h<=0) {alert('h параметр = 0'); } else if (t<=0) alert('t параметр = 0'); for some reason the logical operator || or it does not work. only when both conditions (h<=0) (t<=0) are equal to 0 exits the loop. I would like an example of how to exit the loop when one of the variables <= 0 Thanks in advance.
while (...) { } else. discard all unnecessary from your code and provide a minimal reproducible example - Grundyтолько когда оба условия (h<=0) (t<=0) равны 0 выходит из цикла..... and nowодна из переменных уходит в - а вторая = 0.... we should decide) and it is better to show the code more than it is ..... otherwise this is all the fortune telling on tarot cards - Alexey Shimansky