Javascript while Statement Question 2

Introduction

What is the output of the following code?



let loopVar = 0;
while (loopVar < 4) {
  loopVar++;
  console.log(loopVar);
}


1
2
3
4



PreviousNext

Related