Do You Know The Difference?

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 93

  • @SuboptimalEng
    @SuboptimalEng 3 года назад +149

    What Kyle teaches: CSS styling
    What I want to learn: Hair styling

  • @DilanDog
    @DilanDog 3 года назад +5

    This guy is born to be a teacher and mentor

  • @sidthetech_USA
    @sidthetech_USA 3 года назад +24

    The thing I like about Kyle's CSS tutorials is he always does it with style.

  • @programmingforfun4158
    @programmingforfun4158 2 года назад +1

    You are genious bro. Instead of focusing on just basic things you always dive deeper.

  • @fabaladibbasey7453
    @fabaladibbasey7453 3 года назад +47

    Also Nodelist can easily be converted into array with spread operator to be able to have all JavaScript array method functionality

  • @talatkuyuk6556
    @talatkuyuk6556 3 года назад +1

    This was my pain, could not understand the weird behavior of the nodes and elements. Thank you very much, now I understand.

  • @m4m205
    @m4m205 3 года назад

    You just save my life.
    I am working on a project and I need to understand this.
    Thank you.

  • @Stevie1derson
    @Stevie1derson 3 года назад +24

    Tip to use Array methods on dom elements from document.querySelectorAll()
    1) Array.from(document.querySelectorAll(“element”))
    2) […document.querySelectorAll(“.selector”)]

  • @connorallen162
    @connorallen162 3 года назад +7

    Super helpful! this was such a mystery to me.
    Though I see why direct DOM manipulation isn't exactly encouraged for beginners, this kind of operation could really use a framework to make it more maintainable and scalable!

  • @AustinThomasFilms
    @AustinThomasFilms Год назад

    I found this on your website and came to RUclips to give you a like. Super helpful!!!! This cleared up a lot

  • @oldclient
    @oldclient 3 года назад

    Very informative. First time I noticed the difference between these DOM methods when I worked with , and nodes in a project.
    You have to notice that Node also is handling attributes and other DOM types. Therefore, the nodeType of a Node has these values: 1 (element), 2 (attribute), 3 (text) and more... Nine or ten in total currently.

  • @codlover1468
    @codlover1468 2 года назад +3

    You are awesome brother. You clear all my doubt. Love from 🇮🇳

    • @BoatLoad-o5z
      @BoatLoad-o5z 16 дней назад

      when someone incorrectly say "doubt" instead of "question" we know right away he/she is indian

  • @DarkSomaX
    @DarkSomaX 2 года назад +1

    Thank you so much, I was breaking my head trying to understand the differences between the nodes and the elements and how they work 🙃

  • @Enes-ik4bm
    @Enes-ik4bm 2 года назад

    Thank you for videos. Love from Turkey 🙂

  • @talhaibnemahmud
    @talhaibnemahmud 3 года назад +3

    Extremely helpful video ❤️

  • @karthicksj1936
    @karthicksj1936 3 года назад +2

    Thank you Kyle for giving this cheat sheet.Your teaching is also awesome 👌👌

  • @sereneabrahammathew9738
    @sereneabrahammathew9738 3 года назад +3

    That info on live updates is really useful 🙂

    • @dave6012
      @dave6012 3 года назад +2

      Yup, can’t say how many times I’ve redefined the same query selector inside functions for dynamic content. Now I know I can keep just one definition in the global scope to get the updates.

  • @nsharma4981
    @nsharma4981 3 года назад

    Only you can demystify the most cryptic of JavaScript's intricacies in such an easily understandable manner within 9 minutes, Kyle! This was really helpful! :)

  • @pierre3639
    @pierre3639 11 месяцев назад

    Awesome! Well explained and simplified

  • @alexmercer8984
    @alexmercer8984 2 года назад

    Bro, I absolutely Love this video!

  • @gopalloharnew5948
    @gopalloharnew5948 2 года назад +1

    Kyle don't use any vscode theme but still he customizes it a lot which we cannot see directly !

  • @johnnypark5398
    @johnnypark5398 2 года назад

    Super well explained. thank you!

  • @tomraaff4576
    @tomraaff4576 3 года назад +2

    you can use instanceof to see if a node is an HTML element. It makes working with nodes easier.
    ie.
    if (node instanceof HTMLElement) { node.innerText = 'this is an html element' }

  • @raven.4815
    @raven.4815 Год назад

    Can't thank you enough for this! You really saved me from a couple of headaches lol

  • @bayasahamed1815
    @bayasahamed1815 Год назад

    Thanks for this video and clear explanation.

  • @HarshKapadia
    @HarshKapadia 3 года назад

    Wow! AMAZING video Kyle!

  • @justanotherhotguy
    @justanotherhotguy 3 года назад +1

    Learned something new today, thank you!

  • @YaseenAli08
    @YaseenAli08 2 года назад

    thanks alot, kyle your tips and teachings are very informative and helpful.

  • @franciswayungi3519
    @franciswayungi3519 3 года назад

    Thank you very much Kyle for your detailed explanations.

  • @akash-m8g6p
    @akash-m8g6p 3 месяца назад

    I lost you at Element. Thanks for sharing

  • @dave6012
    @dave6012 3 года назад

    Shedding light on the dark corners 🙌

  • @deepaknegi4385
    @deepaknegi4385 3 года назад

    Awesome information, thanks for sharing

  • @MrTomro
    @MrTomro 3 года назад

    i had no idea about the live update thing. ty

  • @naveedalirehmani4135
    @naveedalirehmani4135 2 года назад

    Thank you Kyle, Thank you very much!

  • @arulmuruganK94
    @arulmuruganK94 3 года назад +4

    I always had doubts when it comes HTML node and element

  • @realfranciscohermida
    @realfranciscohermida 3 года назад +6

    Couldn't you easily convert either type of collection to arrays and not have to deal with live updates if that is not desired?

  • @Stormpaw
    @Stormpaw 2 года назад

    Thanks, that video helped a lot!

  • @bones_twisting_sorrow4750
    @bones_twisting_sorrow4750 3 года назад

    Great explainer, thank you Kyle.

  • @milanpavlovic8141
    @milanpavlovic8141 Год назад

    This helped me soo much

  • @geforcesong
    @geforcesong 3 года назад

    That's a good point. thanks!

  • @vahidseyidov
    @vahidseyidov Год назад

    Thanks for all man

  • @michaeleke3913
    @michaeleke3913 3 года назад

    Great Video...learnt alot!

  • @raymondyoo5461
    @raymondyoo5461 3 года назад

    great video thanks a lot for your tip

  • @srinik9999
    @srinik9999 3 года назад +29

    I thought it's Node JS vs Someother New technology like Nodejs. 😂

  • @tomasgilamoedo8301
    @tomasgilamoedo8301 2 года назад

    Great content! thank bro

  • @bevik12
    @bevik12 3 года назад

    Can we get a collection of your cheat sheets Kyle? Pleeease!

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 3 года назад

    I ask this my self a long time. Now i gonna figure it

  • @yaseenlakhdhar6090
    @yaseenlakhdhar6090 3 года назад

    Awesome Kyle thanks!

  • @suryapratapsingh5149
    @suryapratapsingh5149 3 года назад

    Please cover advance concepts of ES6 and ES7

  • @zenlogie9310
    @zenlogie9310 3 года назад +2

    but Kyle, why would we wanna have a static list that doesn't live-update ??

  • @PerfectionOfError
    @PerfectionOfError 3 года назад

    Learned something new!

  • @AsakuraAvan
    @AsakuraAvan 2 года назад +2

    So a node is a superset of an element? Every element is a node but not every node is an element?

  • @shwackthenoobsac
    @shwackthenoobsac 3 года назад

    Great content

  • @tinmank
    @tinmank 3 года назад +1

    I've got four consecutive notifications this video, its like youtube trying to get an answer for you.
    do you but do you?

  • @vatsalyasinghi438
    @vatsalyasinghi438 3 года назад

    Please do a tutorial on next js..

  • @hartztech8098
    @hartztech8098 3 года назад

    Great to reason for selecting because HTMLCollection its update automatically, When we selected sometime we don't want to update selecting further that we required.

  • @asagex
    @asagex 3 года назад +1

    Before I watch… my guess is that nodes refer to anything while element refers to just tag based ones. Element would exclude text nodes and such
    Edit: despite my poor wording, I appear to be correct. Sweeeeeeet

  • @Pacvalham
    @Pacvalham 3 года назад

    Does this prevent live updates?
    const parents = Object.freeze(document.getElementsByClassName('parent'))

  • @gopalloharnew5948
    @gopalloharnew5948 2 года назад

    oOo that's why you prefer querySelector instead of getElementsByClassName !

  • @Shuyinz
    @Shuyinz 3 года назад +1

    I didn't get it. Why would you prefer static over live update on HTML? I can't see any real case scenario where it would be harder to debug?

    • @mhombach3035
      @mhombach3035 3 года назад

      That was my question too, but I guess that in bigger projects you never know what sideeffects are triggered by calling some function. And let's say you are iteration through the "live updated list" with a for-loop and you are creating a const before that loop and store the list's length in there, then the iteration is faulty if some new element is added inbetween, because the for-loop won't reach the end of the array since it changed length.
      I guess it's not "bad practice" to use either, you just have to be knowing what you want to do, what things are happening inside your app and then decide for the best method :)

    • @Shuyinz
      @Shuyinz 3 года назад

      @@mhombach3035 Sounds very reasonable! Great! Thanks for sharing! :)

  • @SanjeevKumar-fi1kt
    @SanjeevKumar-fi1kt 3 года назад

    Hlo sir I need ur help... how can I contact u?

  • @윤지만-w4m
    @윤지만-w4m 3 года назад

    super awesome

  • @funnyclipsmsda
    @funnyclipsmsda 3 года назад

    I have a request for a video. I do HTML, CSS and JS coding. For one of my projects, I require a custom scrollbar. I know how to make one, but the conventional ::-webkit scrollbars aren't as customizable as I'd like. What I'm looking for is to replace the scrollbar with a div, so that you have to drag the div to scroll, not the scrollbar thumb. Please help me, I haven't found a solution online yet.

    • @smilo_don
      @smilo_don 3 года назад

      One way would be to make the div draggable then use the ondrag event to calculate a position and scroll to it using window.scrollTo but it can be dragged both horizontally and vertically so you would have to lock it to only one.

  • @alexmahone501
    @alexmahone501 3 года назад

    Beast

  • @batuhanunal9380
    @batuhanunal9380 Год назад

    wonderfull

  • @Arabian_Abomination
    @Arabian_Abomination 3 года назад

    4th

  • @trentreimer130
    @trentreimer130 3 года назад

    I'm more inclined to listen to someone who plays a Jackson.

  • @mohammedelhadididi4612
    @mohammedelhadididi4612 3 года назад +1

    First comment , I know that's dumb but...😂