Bob/tests.bob
Bobby Lucero 17c15e5bad Various changes
Arrays, loops, ternary, and other major features. Check doc
2025-08-06 21:42:09 -04:00

38 lines
696 B
Plaintext

// var code = "var a = [];
// for(var i = 0; i < 1000; i++){
// push(a, func(){print(\"I is: \" + i); return (toString(i) + \": \") * 5;});
// }
// var total_ops = 0;
// // while(len(a) > 0){
// // var fun = pop(a);
// // print(\"Function returns: \" + fun());
// // total_ops++;
// // }
// print(len(a));
// a = [];
// print(len(a));
// input(\"Waiting for input\");
// print(\"Total operations: \" + total_ops);";
// print(code);
// eval(code);
// print(0xFF);
var flag = true;
var arr = [0];
while(true){
if(flag){
arr[0]++;
}else{
arr[0]--;
}
if(arr[0] == 0 || arr[0] == 10){
flag = !flag;
}
print(arr[0]);
sleep(0.01);
}