`println("item at $index is ${items[index]}")` Wh...
# getting-started
s
println("item at $index is ${items[index]}")
What is the role of curly and square brackets in the above example?
d
Curly: Delimiters for the variable in the template string, the compiler needs these so that it knows that you want
items[index]
injected and not
items
with the string
"[index]"
after it. Square: Array indexing operator.
s
Thanks.