Skip to content
Advertisement

Program is skipping inner loop

I am trying to check whether any two numbers in a list add up to 0, but after the first iteration of j = 1, the program skips the inner loop.

JavaScript

Output

Output

Advertisement

Answer

Move your j = 1 inside first loop.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement