命令行中输入node启动REPL:
> var x =2;
undefined
> do{x++;
... console.log("x:="+x);
... }while(x<6);
x:=3
x:=4
x:=5
x:=6
undefined
>
Ctrl + C退出循环或者当前终端;
时间: 2024-09-30 20:37:53
命令行中输入node启动REPL:
> var x =2;
undefined
> do{x++;
... console.log("x:="+x);
... }while(x<6);
x:=3
x:=4
x:=5
x:=6
undefined
>
Ctrl + C退出循环或者当前终端;