Javascript do-while Statement Question 1

Introduction

What is the output of the following code?


// An example of a do .. while loop
let loopVar = 0;
do {
  loopVar++;
  console.log(loopVar);
} while (loopVar < 4)


1
2
3
4



PreviousNext

Related