Array and object

Writing a table and an object are the same as JavaScript

Array

myArray = ['ana', 'jim']
name = myArray[0]

We can use the Array object to manipulate arrays

myArray = ['ana', 'jim']
Array.length(myArray) // 2

Object

myObject = {
    name: 'ana'
}
name = myObject.name

We can also read a property. Like this :

myObject = {
    name: 'ana'
}
name = myObject['name']

Last updated