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) // 2Object
myObject = {
name: 'ana'
}
name = myObject.nameWe can also read a property. Like this :
myObject = {
name: 'ana'
}
name = myObject['name']Last updated
Was this helpful?