Skip to end of banner
Go to start of banner

Array Keyss

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Any variable type can be transformed into an array by adding the array symbols [] after the type declaration.

Example 1 - Adding values by index

string [] fruitColor;
fruitColor["Apple"] = "Red";
fruitColor["Banana"] = "Yellow";
fruitColor["Orange"] = "Orange";

Example 2 - Adding values to next position

return fruitColor["Banana"];

Example 3 - Retrieving a value

Error rendering macro 'excerpt-include' : No link could be created for 'Array Keyss Example 3'.

  • No labels