Basic JavaScript (40/111) | Modify Array Data With Indexes | freeCodeCamp

Publicado em: 01 Setembro 2020
no canal de: Stral Tech
356
1

Basic JavaScript (40/111) | Modify Array Data With Indexes | freeCodeCamp

Full playlist 👉    • Basic JavaScript (1/111) | Comment Your Ja...  

We can access the data inside arrays using indexes.

Array indexes are written in the same bracket notation that strings use, except that instead of specifying a character, they are specifying an entry in the array. Like strings, arrays use zero-based indexing, so the first element in an array has an index of 0.

Example
var array = [50,60,70];
array[0]; // equals 50
var data = array[1]; // equals 60

Note:
There shouldn't be any spaces between the array name and the square brackets, like array [0]. Although JavaScript is able to process this correctly, this may confuse other programmers reading your code.

https://www.freecodecamp.org/learn/ja...


Nesta página do site você pode assistir ao vídeo on-line Basic JavaScript (40/111) | Modify Array Data With Indexes | freeCodeCamp duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Stral Tech 01 Setembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 356 vezes e gostou 1 espectadores. Boa visualização!