Tin

Examples · learn/08-collections · 136 of 339

change

examples/learn/08-collections/change.tintin run examples/learn/08-collections/change.tin
fn main() {
  var todo = ["write", "test"]
  todo.push("ship")              // add at the end
  todo[0] = "write more"         // replace one item
  print(todo)
  let done = todo.pop()          // remove the last one and get it back
  print(done)
  print(todo)
}