rhai/scripts/array.rhai

9 lines
109 B
JavaScript
Raw Permalink Normal View History

let x = [1, 2, 3];
2020-03-16 07:50:12 +01:00
2020-05-02 10:23:36 +02:00
print("x[1] should be 2:");
print(x[1]);
2020-03-16 07:50:12 +01:00
2016-03-26 18:46:28 +01:00
x[1] = 5;
2020-03-16 07:50:12 +01:00
2021-04-09 16:48:47 +02:00
print(`x[1] should be 5: ${x[1]}`);