Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 299 Bytes

File metadata and controls

32 lines (28 loc) · 299 Bytes

Test case: while loop

JavaScript:

while (true) {
    var i = 10;
}

Python:

while True:
    i = 10

Test case: do-while loop

JavaScript:

do {
  i += 1;
  result += i;
} while (i < 5);

Python:

i += 1
result += i
while i < 5:
    i += 1
    result += i