26 lines · 580 B · Text
RawDownload
// declare regular array (capacity doesn't matter so much)float foo[4]; // use as int-based array2.5 => foo[0]; // use as associative array with key "yoyo"4.0 => foo["yoyo"]; // access as associative (print)<<< foo["yoyo"] >>>; // access empty element<<< foo["gaga"] >>>;  // -> should print 0.0 // add a second associative element44.0 => foo["yiyi"]; // get the array keys with all of the keys in the arraystring keys[0];foo.getKeys(keys); <<< keys[0], keys[1] >>>; // call .help() on an array to get more information about its type, methods, etc.// foo.help();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t