Great tutorial! The forEach() should use lis_array instead of lis. Array.prototype.forEach() can only apply to arrays, not array-like objects.
@AllThingsJavaScript5 жыл бұрын
You are correct. I converted to an array and then used the wrong variable.
@jessicaryan98203 жыл бұрын
Brilliant, thank you! This is going to make web animation a lot easier
@AllThingsJavaScript3 жыл бұрын
Glad it helped!
@MultiNAME692 жыл бұрын
Thank you very much.
@nixonnelson88566 жыл бұрын
Sir you are great . But had a doubt , U converted Node list into array but you didnt use forEach on the new array still it worked ??
@AllThingsJavaScript6 жыл бұрын
I rewatched that portion of the tutorial and you are correct. That is a mistake. I used the wrong variable. It looks like forEach will function on a nodeList, which I was not aware of, but I believe other Array methods will not. Sorry about the confusion.
@usmanabdurehman975 жыл бұрын
Nodelist,HTML collection and normal array etc are iterable using any loop may it be for, while or the forEach method
@BryanGranseDevs7 ай бұрын
Still good video this 2024
@joshrandall36634 жыл бұрын
Clear explanation!
@gbbowler4 жыл бұрын
Curious about first couple of lines in your JS file. They are: let lis = document.querySelectorAll('li'); let lis_array = Array.from(lis); You never use the variable lis_array anywhere in your code after that, so why did you define it? I"m working on something now using the data- attribute. I left that second variable out of my code, and it works just fine. BTW, I love your vids. I'm also taking one of your courses on Udemy.
@AllThingsJavaScript4 жыл бұрын
Great question. I think I just forgot to use it. Basically that line is converting the list of elements to an array. This would be very helpful if you needed to use array methods, so it is a common practice for me. However, many things work on the array-like collection like forEach, so it was unnecessary.
@mickwhyte42043 жыл бұрын
Always very helpful. Many thanks.
@akira5576 жыл бұрын
thank you!
@phanindrakumarpulletikurti6 жыл бұрын
awesome lecture.
@somashekarbagurthippeshapp23893 жыл бұрын
Thank you sir
@rogerh26945 жыл бұрын
You used the forEach() method on the node list (lis) not the array (lis_array) but your event listeners still worked...?? Update: still works on the node list lol
@AllThingsJavaScript5 жыл бұрын
forEach will work on any iterator. A node list is one, so that is why it still worked.
@NixTheG0at5 жыл бұрын
For NodeList , forEach works, but for HtmlCollection doesnt
@jainshilpi36 жыл бұрын
Could you pls make video for call bind apply methods?
@NedumEze2 жыл бұрын
Thank you sir. So helpful. I must be doing something wrong. Can't get my own code to work. Could I share it with you? Maybe, you'd spot my mistakes. Please.
@AllThingsJavaScript2 жыл бұрын
Sure, post it here.
@NedumEze2 жыл бұрын
@@AllThingsJavaScript Ah! Bless you sir. I've got sorted now. Thrilling to see it working. Thank you so much for offering to help sir. I hope I can reach out to you if I run into any more brick walls?
@muhammadsafiullah84285 жыл бұрын
Thanks!
@seenuvasanv6 жыл бұрын
Thanks
@YoungmeePark11033 жыл бұрын
Super!!
@adicide90703 жыл бұрын
a bit faster, though, would be greeeeaaaat. cheers.
@rayna.v3 жыл бұрын
change the playback speed.
@jainshilpi36 жыл бұрын
Can u please make some video related with javascript datastructure?
@AllThingsJavaScript6 жыл бұрын
Can you explain what you are referring to for javascript datastructure videos?
@jainshilpi36 жыл бұрын
data structures like queues an stacks, etc using objects and arrays?
@AllThingsJavaScript6 жыл бұрын
I have a number of tutorials on both objects and arrays. I have a specific playlist on objects and there are numerous other tutorials on both objects and array.
@jainshilpi36 жыл бұрын
means topic relater with linked list stack queue?
@ironhide99554 жыл бұрын
@@jainshilpi3 could you please share me the links if you have found some useful videos related to javascript datastructure?
@RameenFallschirmjager4 жыл бұрын
The other day I heard from a c++ coder that web coders are not programmers, or not even developers! Because he asserted web doesn't have logic and algorithms have nothing to do with web! I don't know under which rock he was all these years or in which cave he was been hiding! Anyway, I hope he sees this channel, and comes out of his grave delusion. And choose a photo for channel icon or whatever it is for god sake! It looks darn bad like this!
@AllThingsJavaScript4 жыл бұрын
I think most people have been corrected of that misperception, but I guess there are still some out there. Google keeps wiping my channel photo. It is a bit frustrating. Not sure what is going on.
@RameenFallschirmjager4 жыл бұрын
@@AllThingsJavaScript Thanks for answering me. The removal of your channel photo might be due to copy right infringement. Just put some original photo which you've made it yourself. For example your beautiful face! You have a beautiful voice and because you're contributing to humanity a great deal your soul must be beautiful too. So I'm sure your face is beautiful! Then putting your own face for the icon of your channel is a good option bro!
@AllThingsJavaScript4 жыл бұрын
Thanks for the suggestion. I don't know how beautiful my face is, but that was the picture I've had up and have tried to load multiple times again. I'm not sure what is going on, but still trying to figure it out.
@RameenFallschirmjager4 жыл бұрын
@@AllThingsJavaScript So maybe you're too good looking that it raises powerful people jealousy, so they remove your picture! Like snow white and seven dwarfs and that darn magic mirror and that nasty queen who couldn't bear someone more beautiful than her!😂 Take care of yourself bro!