CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Counting Ordered Pairs

JavaScript code walkthrough · Question 29
mediumLoops

Code

Read carefully. What does this print?
1let count = 0;
2for (let i = 0; i < 3; i++) {
3 for (let j = 0; j < 3; j++) {
4 if (j > i) count++;
5 }
6}
7console.log(count);

Your answer