for

Why do I need 2 loops: for and foreach?

Questions: Why do I need foreach, if I can iterate through an array, for example, through the for loop? Is it possible to d ... gth; i++) { System.out.println(numer[i] + " / " + denom[i] + " равно " + numer[i] / denom[i]); } } }

the for JavaScript loop

People started learning JS, we need to solve this problem: Write a loop that outputs the following triangle in 7 calls to co ... e.log(pk); //вывел значение переменной в консоль }; What did I do wrong? Don't judge me harshly, I'm new to JS :).

Using try-catch in a "FOR" loop in java

See, the user fills in an array of numbers (of any sign) in a loop. It is not possible to make a try-catch so that if, for ex ... e this: 1: r Wrong input! It should be a number 2: Wrong input! It should be a number 3: Wrong input! It should be a number