array
JavaScript, podemos almacenar varios datos en un solo lugar. Inicia una declaración de matriz con un corchete de apertura, finalícela con un corchete de cierre y ponga una coma entre cada entrada, como esto: var sandwich = ["peanut butter", "jelly", "bread"]
. myArray
para que contenga tanto una string
como un number
(en ese orden). Insinuación myArray
debería ser una array
.
testString: 'assert(typeof myArray == "object", "myArray
should be an array
.");'
- text: El primer elemento en myArray
debe ser una string
.
testString: 'assert(typeof myArray[0] !== "undefined" && typeof myArray[0] == "string", "The first item in myArray
should be a string
.");'
- text: El segundo elemento en myArray
debe ser un number
.
testString: 'assert(typeof myArray[1] !== "undefined" && typeof myArray[1] == "number", "The second item in myArray
should be a number
.");'
```