rhai/scripts/array.rhai
2021-04-09 22:48:47 +08:00

9 lines
109 B
JavaScript

let x = [1, 2, 3];
print("x[1] should be 2:");
print(x[1]);
x[1] = 5;
print(`x[1] should be 5: ${x[1]}`);