Boomla language docs
Index expressions
+
Overview
Types
Nil type
Boolean type
Numeric types
String type
Array type
Map type
Struct type
Function type
File type
Bucket type
Reference types
Box type
Expressions
Operators
Get expressions
Index expressions
Slice expressions
Grouping
Literals
Instantiations
Identifiers
Call expressions
Xml expressions
Function literals
As expressions
Statements
Import statement
Type declarations
Var declarations
Function declarations
Method declarations
Assign statement
If statement
For statement
Assert statement
Return statement
Fail statement
Panic statement
Yield statement
Break statement
Continue statement
Defer statement
IncDec statement
Expression statement
Block statement
Index expressions
Look up an array element, map entry or string char using the syntax
A[B]
.
fn main() { names := []string{"Max", "Sarah"} println(names[1]) }
Run
fn main() { favoriteCities := map[string]string{ "Max": "San Francisco", "Sarah": "Porto", } println(favoriteCities["Sarah"]) }
Run