JavaScript Programming Tutorial 35 - Intro to Arrays

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

So much better than the classes I pay so much for. Thank you!

colleenlindsay
Автор

Thank you Caleb, It's useful to know that there is gap and can extend array.length in JavaScript.

rittenbrake
Автор

Hey Caleb, love your videos.
At 2:05 you mention the 3rd item is the 2nd index which doesn't appear to be correct, the 3rd item is located in index 2 which is the 3rd index.
Or have I lost it already in arrays??

jimmahT
Автор

at 4:00, I do not understand something. with this code below, where do the indexes even come into play when we use the -1. so ages.length is 6 since there are a total of 6 elements. but now the index is somehow used without the [ ] which is confusing me. should it not be ages.length-1 to now give 5 as the output. simply like that without the mention of indexes anywhere?
let ages = [10, 4, 44, 2, 8, 9];
console.log(ages.length - 1);

instead to get the output for what you said in terms of getting the second last element, shouldn't it be like this below? This will give you the last element in the array.

console.log (ages[ages.length - 1]

marco
welcome to shbcf.ru