JavaScript for Developers 29 - The Secret behind JavaScript Arrays

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

In this video, you'll learn about the secret behind JavaScript arrays. And what you learn may surprise you. Just don't tell anyone!
Рекомендации по теме
Комментарии
Автор

wow, the first js guide that was not a waste of time! great job

heyman
Автор

I did the js basics for 3 months now and moving on to this one is best decision … very deep yet very well explained

neganega
Автор

thank you for this short array refresher tutorial. big help!

jeyzzz
Автор

Another interesting thing to note here is
1. try delete myArray.length - this wont delete the length property but returns you false.
2. try changing the length value, myArray.length = 5, this will work.
3. try changing the length value to something other than a number myArray.length = "foo", this will fail with message "Invalid array length"

It will be glad to understand what happens here.

mraghul
Автор

The good thing about your videos is short And easy to understand not long and boring that difficult to understand thank you to simplify the information

alialrahem
Автор

Thank you so much for superb tutorials, u make everything so easy to understand

rashmigandecha
Автор

Really in depth video. Thank you for making

joey
Автор

thank you. very good explanation of showing array is an object

sbollap
Автор

If the numeric index converts to a string, then is it faster to just use a string?

sparkman
Автор

wow thank you so much i didn't know that array.length actually counts index..!!

rushendrarushi
Автор

8:05 'foo' = 'ABC' is just a property element is not added to array hence the size of the array is same.

syedaqib
Автор

Is the type coercion not converting your string "0" to a number 0 when you reference the property/array-index? Since when you print out the array/object using console.log, it prints the property/indexes as numbers.

keeranmnc
Автор

Hello Kaushik, Thanks for delivering such useful content. Many people are getting benefited from your kind efforts. I have one doubt regarding the array insertion:
I want to add an element into an array with an index value but do not want to remove the existing element from that index.
What I am doing here :
var techSkills = ["Java", "React", "JavaScript"];
techSkills.splice("2", 0, "Hibernate");
console.log(techSkills); // output ["Java", "React", "Hibernate", "JavaScript"];
techSkills.splice("2A", 0, "AWS");
console.log(techSkills); // output ["AWS", "Java", "React", "Hibernate", "JavaScript"];

My question is how come it's inserting value at the 0th index. How come the string index value is converting to zero.
Thanks.

Bhanwar-Rathore
Автор

Thank you for your video. How 'delete myArray[0]' works in the above example? i got ' [undefined × 1, "world", "JS", "foo"] ' when I tried to delete element at 0 index

nuruthin
Автор

Sir as you said in the array [4] the number 4 will be converted into string and i have a doubt that we can acces the properties of array using dot notation so once the number is converted into string why can't we access that using the dot notation.

dvrreddy
Автор

If array is an object then do we have an array that has a value which is another array like we have in case of objects?

princechhabra
Автор

Do all items in an array have to be the same type?

TT-udgf
Автор

It looks that the design of the language is not consistent since the length of an array depends on a number property.

richardwang
Автор

"More I know, more I like my old dog (Java)"
Great videos but this language seems so weak, I hope it gets better in next videos.. or century

JoseLuisRomeroFiruzzZ