solilang 0.21.1

A statically-typed, class-based OOP language with pipeline operators
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test spread operator in arrays
let a = [1, 2, 3];
let b = [0, ...a, 4];
print("Spread in array:");
print(b);  // [0, 1, 2, 3, 4]

let c = [...a, ...a];
print("Double spread:");
print(c);  // [1, 2, 3, 1, 2, 3]

let nums1 = [1, 2];
let nums2 = [3, 4];
let nums3 = [...nums1, ...nums2];
print("Combined spreads:");
print(nums3);  // [1, 2, 3, 4]

print("Spread operator tests passed!");