SOURCE

var x = 3;
var i = 0;

do {
  console.log(i);
  i++;
} while(i < x);
console 命令行工具 X clear

                    
>
console