define a while loop in node js

JavaScript
do {
  text += "The number is " + i;
  i++;
}
while (i < 10);while (n < 3) {
  n++;
}
Source

Also in JavaScript: