Skip to content
Will Blanton edited this page Jul 27, 2018 · 6 revisions

Added functionality for Arrays!

This is an Extension! Learn about using Extensions here!

Examples:

["0", "1", "2", "3"].strings_to_ints(); // [0, 1, 2, 3]
["apple", "orange", "banana"].contains("apple"); // true
[0, 1, 2, 3].last(); // 3
[0, 1, 2, 3].get_random(); // 2
[0, 1, 2, 3].shuffle(); // [2, 1, 3, 0]
[0, 1].merge([2, 3]); // [0, 1, 2, 3]
[[0, 1], [2, 3]].flatten(); // [0, 1, 2, 3]
Clone this wiki locally