DOM API - JavaScript Tutorial for beginners

  Рет қаралды 26,896

ColorCode

ColorCode

Күн бұрын

JavaScript DOM API, what it is, how to use it, and why use it at all?! It's used by ReactJS, AngularJS, VueJS, jQuery, and most other JS libraries to manipulate the DOM.
This is episode 15 of 20 things Javascript Developers Should Know But Probably Don't.
00:00:00 Intro
00:01:47 What is the DOM API?
00:03:52 Setup
00:04:36 Document interface
00:05:40 Click eventListener
00:06:30 Head, Body and Children
00:08:15 Add new Elements
00:12:50 Add dynamic date
00:15:00 To Do App
00:21:55 Semantic HTML
00:26:50 Remove Elements
00:31:55 Styling & Attributes
00:35:00 Add new Attributes
00:36:30 Query the DOM
00:39:43 Summary
00:41:15 Outro
ColorCode Etsy Merchandise store:
www.etsy.com/shop/ColorCodeStore
DOM API (MDN):
developer.mozilla.org/en-US/d...
Full playlist here: • 20 Things JavaScript D...
JavaScript Promises from the series "20 Things JS Developers Should Know but Probably Don't"
by ColorCode.io, Sina Jazayeri
** Announcement **
Full JavaScript Mastery course is coming! Details at the end of the video. Sign up for Early Access here:
www.colorcode.io/js-mastery

Пікірлер: 220
@garymathe9863
@garymathe9863 2 ай бұрын
This guy is criminally undersubscribed.
@bmehder
@bmehder 7 ай бұрын
Quality over quantity. I have watched all these videos multiple times.
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thanks brother! Nice to see you in the comments section again :)
@mohammadabbas1623
@mohammadabbas1623 7 ай бұрын
I'm so happy that you are back sir . now just cover all 5 remaining topics quickly 🙏
@ColorCodeio
@ColorCodeio 7 ай бұрын
Of course! 👊
@aziskgarion378
@aziskgarion378 7 ай бұрын
I just discovered this channel and was watching videos from last year. Didn't realize there was a fresh video from a week ago. Amazing job. Keep doing it. Till 20!
@ColorCodeio
@ColorCodeio 5 ай бұрын
Hell yeah! More vids coming soon
@ColorCodeio
@ColorCodeio 7 ай бұрын
Episode 15: The DOM API 🤘👨‍💻🔥🎉
@billymaaa
@billymaaa 5 ай бұрын
Best js tutorial on youtube! I love how you make every second so entertaining and easy to digest! Keep up the amazing work and I can't wait for your future videos, podcast, and mastery course!
@ColorCodeio
@ColorCodeio 5 ай бұрын
Thanks so much Billy. Made my day.
@ciprianparaschiv7591
@ciprianparaschiv7591 7 ай бұрын
Yo, thanks for this and the whole series. It's super useful. This vid in particular I really wished I had it a couple of months ago. Had to discover most of this by trial and error. Great content!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Glad to hear it!
@nancychaudhry3623
@nancychaudhry3623 7 ай бұрын
Wow! Great to have you back and another great video!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you! Good to be back.
@zhiend3935
@zhiend3935 7 ай бұрын
Your videos deserves much more than 5k
@iambestin
@iambestin 6 ай бұрын
Missed your videos for quiet a longtime. Great your back :)
@ColorCodeio
@ColorCodeio 6 ай бұрын
Ty! Good to be back.
@hanshochbaum4335
@hanshochbaum4335 7 ай бұрын
Hello Sina, I'm in a 3 year computer Science course and because of your content I have a deeper understanding of JavaScript's internal framework. Thanks, Al
@ColorCodeio
@ColorCodeio 7 ай бұрын
Glad to hear it!
@web-sd9be
@web-sd9be 7 ай бұрын
One of the best channels for programming hands down. Thank you very much sir. :)
@ColorCodeio
@ColorCodeio 7 ай бұрын
You are most welcome
@user-oz3xy9th3u
@user-oz3xy9th3u 7 ай бұрын
i'm so glad you're back! thank you so much! id really appreciate it if you make a video on ES6 modules
@ColorCodeio
@ColorCodeio 6 ай бұрын
Good idea
@adam29334
@adam29334 7 ай бұрын
good to see you back dude!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thanks!
@pzpalasti
@pzpalasti 7 ай бұрын
Congrats!!! 🎉 and thank you for the new video!!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you too!
@keshavakumar9828
@keshavakumar9828 7 ай бұрын
It's good to see you back. KZbin lacks quality which you give us.
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you!
@thesaqlain
@thesaqlain 4 ай бұрын
Hats off to you... your teaching style and how you present the scenario is literally .... i mean i have no words to describe it
@user-is8yk4iq7f
@user-is8yk4iq7f 2 ай бұрын
I have the perfect playlist on my collection appreciate your contribution sir
@12345678uygfcxdrtghn
@12345678uygfcxdrtghn 7 ай бұрын
Good tutorial, awesome quality/editing as always, little more beginner friendly (most JS devs probably know that already). Say hi to Quoli! Ciao!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thanks, will do!
@fasteditsyt
@fasteditsyt 8 күн бұрын
My brain is so big now! TY
@ColorCodeio
@ColorCodeio Күн бұрын
👍🏼🧠
@jollyren
@jollyren 7 ай бұрын
I'm sooooo happy you made another video
@ColorCodeio
@ColorCodeio 7 ай бұрын
Me too! More coming soon.
@shonuff4323
@shonuff4323 7 ай бұрын
Love your lessons!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you! 😃
@francesko1763
@francesko1763 7 ай бұрын
ColorCode is alive!!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Hell yeah 👍
@Wakkyguy
@Wakkyguy 7 ай бұрын
Have been missing the fun for a while!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Fun is. back!
@Wakkyguy
@Wakkyguy 7 ай бұрын
@@ColorCodeio ♥
@javeedakhter324
@javeedakhter324 7 ай бұрын
Was waiting from a long time🎉
@ColorCodeio
@ColorCodeio 7 ай бұрын
The wait is over!
@shan_arosh
@shan_arosh 7 ай бұрын
glad you're back
@ColorCodeio
@ColorCodeio 7 ай бұрын
That's right!
@opencode1
@opencode1 7 ай бұрын
Thnx God i have my notification open for you. Looooooooooove it haha i was going back to prototype 3 days ago
@ColorCodeio
@ColorCodeio 7 ай бұрын
You won't have to wait along anymore :) I'm back!
@opencode1
@opencode1 7 ай бұрын
You are an amazing teacher. Welcome Baaaaack @@ColorCodeio
@fernandodasilvagomes7905
@fernandodasilvagomes7905 5 ай бұрын
Mesmo com dificuldade de entender o ingles, amo seus videos! continue
@ColorCodeio
@ColorCodeio 5 ай бұрын
Great!
@freakymickey
@freakymickey 5 ай бұрын
At first, I thought you are kindda overdoing the act, But later I found you and your teaching AMAZING than any other people out there. I mean it. Wish to have you in my contact list.❤🔥
@priyanshuagrawal9204
@priyanshuagrawal9204 7 ай бұрын
Finally after such a long long time 🎉🎉❤❤
@ColorCodeio
@ColorCodeio 7 ай бұрын
🕺🏻
@DevlogBill
@DevlogBill 7 ай бұрын
ColorCode, welcome back! Watching your videos, I always pull out the notepad and pen and take plenty of notes! I always learn a lot from you, thank you. Question? Is there any relation between you and the other KZbinr "The Coding Train"? You both have somewhat similar styles in teaching and great humor.
@ColorCodeio
@ColorCodeio 6 ай бұрын
No relation, but he's great
@affanahmed2897
@affanahmed2897 6 ай бұрын
Hello Sina! I'm thrilled to be your new student from Pakistan. I recently watched your fantastic video on Asynchronous JavaScript, and it really helped clear up some of my concepts. I'm so thankful for that! As a newcomer, I've noticed that some developers use the 'const' keyword, while others use the 'function' keyword when creating functions. I'm a bit confused about which one to use. Does it depend on specific conditions or circumstances? Your guidance would mean a lot to me. I'm really excited to learn from you!😊🙌
@2difficult2do
@2difficult2do 7 ай бұрын
It's good to see and hear you again. ☝️😼👍
@ColorCodeio
@ColorCodeio 5 ай бұрын
@scottldn
@scottldn 7 ай бұрын
Good to see you back 💪
@scottldn
@scottldn 7 ай бұрын
And congratulations 🥂 !
@ColorCodeio
@ColorCodeio 6 ай бұрын
Thank you
@dios8256
@dios8256 6 ай бұрын
Some very nice special effects in this video 🤩
@ColorCodeio
@ColorCodeio 5 ай бұрын
🙏
@JeetKRamnani
@JeetKRamnani 7 ай бұрын
Miss you sir ❤ finally back with Js and humour ❤
@haallefs
@haallefs 5 ай бұрын
Thanks for this fantastic content! 😊
@ColorCodeio
@ColorCodeio 5 ай бұрын
Thanks for this fantastic comment
@G_Breaker
@G_Breaker 2 ай бұрын
I love your approach of teaching ,You will hit that 1M in no time
@harvard004
@harvard004 7 ай бұрын
Welcome back!!!!
@SK4-music
@SK4-music 6 ай бұрын
omg this course is just flames 🔥
@ColorCodeio
@ColorCodeio 6 ай бұрын
🔥
@jaafarassaf9986
@jaafarassaf9986 4 ай бұрын
Really great videos enjoying them so far, Thank you :) ! If I may ask how is the button triggered onsubmit if it does not have a submit role ?
@anthonytirop1338
@anthonytirop1338 7 ай бұрын
incredible session
@ColorCodeio
@ColorCodeio 6 ай бұрын
Thanks Anthony
@jasvindersingh6915
@jasvindersingh6915 5 ай бұрын
Thank you for these videos sinaaaa😅, learnt alot . Looking forward to get more fundamental JS videos 😊
@ColorCodeio
@ColorCodeio 5 ай бұрын
Happy to hear that!
@AlAminKhan03
@AlAminKhan03 7 ай бұрын
So good to see you , Please be regular with us😭
@ColorCodeio
@ColorCodeio 7 ай бұрын
👍♥️
@petesampras2611
@petesampras2611 6 ай бұрын
Great videos. If/when you do have time, perhaps you can do a video that walks users through actual websites, and where JS comes in. More like a case study with illustrative examples. Thanks for spending time and posting highly useful content.
@ColorCodeio
@ColorCodeio 6 ай бұрын
I think that’s a great suggestion
@beinyourguard
@beinyourguard 7 ай бұрын
happy for your lessons and congrats on your marriage!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank ya!
@karthiktalam
@karthiktalam 7 ай бұрын
You are awesome dude. With playback speed 1.75x, ur voice is crystal clear and completed the video in around 25 mins😆
@user-mw5bm2xh9x
@user-mw5bm2xh9x 6 ай бұрын
thanks for the lesson
@ColorCodeio
@ColorCodeio 5 ай бұрын
Thanks for watching
@6.squash.936
@6.squash.936 7 ай бұрын
Return of the King
@ColorCodeio
@ColorCodeio 7 ай бұрын
Too kind 👊♥️
@federexpotolin6284
@federexpotolin6284 5 ай бұрын
your content is very helpful to me. Please continue to make more videos like this. And use real life example
@carljung2850
@carljung2850 7 ай бұрын
this is freaking great
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thanks!
@chhavimanichoubey9437
@chhavimanichoubey9437 7 ай бұрын
Congratulations to you sir, and congratulations to me (because your js videos helped me understand js).
@ColorCodeio
@ColorCodeio 7 ай бұрын
Excellent!
@kamil4351
@kamil4351 7 ай бұрын
nice to see you again :)
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you!
@mrlunatic2022
@mrlunatic2022 7 ай бұрын
Finally 😭😭, your back sir ...
@ColorCodeio
@ColorCodeio 7 ай бұрын
Glad to be back
@mohammadkhakhsoor2068
@mohammadkhakhsoor2068 7 ай бұрын
Wooow , sina Finally you came back Im here to say a big hello to Qoli
@maremare281
@maremare281 5 ай бұрын
Sina nice job 😎 💥🤘🙌 like it a lot :)
@ColorCodeio
@ColorCodeio 5 ай бұрын
🙏👍
@hcw1566
@hcw1566 7 ай бұрын
U R BACK~~!!
@ColorCodeio
@ColorCodeio 7 ай бұрын
Hell yeah! ✊
@sujith.m.s4041
@sujith.m.s4041 7 ай бұрын
Hope your lifes going good, love ur content btw
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank you very much!
@Nathaniel_Cos
@Nathaniel_Cos 7 ай бұрын
Thanks for useful staff
@prachimagdum9213
@prachimagdum9213 2 ай бұрын
Please make a playlist for beginners javascript.... U are a great teacher and want to learn more.. From u Thanku for this playlist ❤
@AugustineGodwin-oj4yu
@AugustineGodwin-oj4yu 5 ай бұрын
I have never understood any programmer Like the way i understood ur tutorials i will be happy if you can do a tutorial on destruction operator and related
@ColorCodeio
@ColorCodeio 5 ай бұрын
Glad to hear it
@xkabuto
@xkabuto 6 ай бұрын
This guy's drip is so outstanding that it makes me pay absolute attention to the video even when it's just him taking a break to drink water
@ColorCodeio
@ColorCodeio 6 ай бұрын
I’m not cool enough to know what drip means but thank you :)
@Yardan_gholi
@Yardan_gholi 7 ай бұрын
is it better to select base on class or id's or data-set ?
@solide_ahmed7907
@solide_ahmed7907 7 ай бұрын
geat video really enjoyed it !!
@ColorCodeio
@ColorCodeio 7 ай бұрын
🙏
@valenciawalker6498
@valenciawalker6498 2 ай бұрын
Thank you!
@ColorCodeio
@ColorCodeio 2 ай бұрын
♥️
@valenciawalker6498
@valenciawalker6498 2 ай бұрын
@@ColorCodeio 🤍🤍
@hooman_talakian
@hooman_talakian 7 ай бұрын
Amazing Content 🏆
@ColorCodeio
@ColorCodeio 6 ай бұрын
Appreciate it
@xviewmytubex
@xviewmytubex 2 ай бұрын
Learning from your video! You got merch? =)
@ColorCodeio
@ColorCodeio 2 ай бұрын
Yep ColorCode.io
@hossainehsani5696
@hossainehsani5696 6 ай бұрын
I can't wait for the day when you have React courses somewhere. I would kill for it.
@dennisbunarta1190
@dennisbunarta1190 7 ай бұрын
Finally!!!!
@SwaggerUi
@SwaggerUi 7 ай бұрын
Congrats 🎉🎉
@ColorCodeio
@ColorCodeio 7 ай бұрын
Thank ya!
@AnupKumar-td9fw
@AnupKumar-td9fw 7 ай бұрын
The only one word after watching --- Amazing ❤❤
@ColorCodeio
@ColorCodeio 6 ай бұрын
🙏
@hanshochbaum4335
@hanshochbaum4335 7 ай бұрын
I do have a question for you. When removing elements from the HTML-Markup what is the best practice for doing this? Example 1: let tHeadTag = document.getElementById("table_header"); while (tHeadTag.hasChildNodes()) { tHeadTag.removeChild(tHeadTag.firstChild); } or Example 2: let tHeadTag = document.getElementById("table_header"); tHeadTag.innerHTML = '';
@joyguy_
@joyguy_ 5 ай бұрын
Finally back
@ColorCodeio
@ColorCodeio 5 ай бұрын
Hell yeah ✊
@rmrtamiltechnology
@rmrtamiltechnology 7 ай бұрын
Thank you sir
@ColorCodeio
@ColorCodeio 7 ай бұрын
You're welcome
@rmrtamiltechnology
@rmrtamiltechnology 7 ай бұрын
@@ColorCodeio sir, how can i get javascript mastery course from colorcode ?
@jimmyhou3729
@jimmyhou3729 7 ай бұрын
wow you are back
@ColorCodeio
@ColorCodeio 7 ай бұрын
That's right!!!
@isaccosta1744
@isaccosta1744 4 ай бұрын
come back, please! Hug from Brazil
@wasimrafik3535
@wasimrafik3535 7 ай бұрын
after 7 months waited for a very long and I hope you complete this series soon next episode will not take another 7 months to appear
@wasimrafik3535
@wasimrafik3535 7 ай бұрын
the above comment was before watching your complete video so excuses
@ayyubs_mind
@ayyubs_mind 7 ай бұрын
Thank you bro. I find job with your help 😢
@jayteecollins1279
@jayteecollins1279 3 ай бұрын
your videos are really so good! i just subscribed yesterday 😀 may i know how you inserted cucumber icon in console?
@capybara0612
@capybara0612 7 ай бұрын
Welcome back
@ColorCodeio
@ColorCodeio 7 ай бұрын
Ty!
@aminkhakzad9257
@aminkhakzad9257 7 ай бұрын
آقا خیلیم عالی و قوی دمت گرم ❤
@ColorCodeio
@ColorCodeio 7 ай бұрын
Merci 🙏
@idprompt
@idprompt 6 ай бұрын
¿Does the picture on your wall is the album cover "The best of sade"?
@ColorCodeio
@ColorCodeio 5 ай бұрын
Yes! Good eye
@yendys74
@yendys74 7 ай бұрын
Lovely
@saferforenvironment5850
@saferforenvironment5850 6 ай бұрын
Thankyou for this video Love from nepal 🇳🇵 Keep shining keep sharing 😊 Ps: You have got a subscriber 🎉
@ColorCodeio
@ColorCodeio 5 ай бұрын
Hello Nepal
@WebSurfingIsMyPastime
@WebSurfingIsMyPastime Ай бұрын
liked, commented, subscribed!
@ColorCodeio
@ColorCodeio 29 күн бұрын
Welcome aboard!
@malavipande6693
@malavipande6693 7 ай бұрын
Bose is back 🤠
@WaliaIbex
@WaliaIbex 7 ай бұрын
Awesome guy where are the remaining 5 ?😊
@mahtabvariyani
@mahtabvariyani 6 ай бұрын
Thanks for the videos AND 😁 You still don't have any videos about hoisting in JavaScript (as i watched them all). Could you consider making your next video about it?
@ColorCodeio
@ColorCodeio 6 ай бұрын
Yes, soon
@ShivamSharma-dq4pu
@ShivamSharma-dq4pu 7 ай бұрын
I love you man
@ayyubs_mind
@ayyubs_mind 7 ай бұрын
Wooooww🎉🎉🎉🎉
@kazikmajster5650
@kazikmajster5650 6 ай бұрын
Why do you work with the console? I want to use it for my file and now I am confused.
@shady5063
@shady5063 4 ай бұрын
When you have the time, can you show us how you setup your IDE the background color and design. Is that the browser being open in the terminal ? Pls make a video showing us how to get that nice looking IDE.
@ColorCodeio
@ColorCodeio 4 ай бұрын
It's called RunJS: runjs.app/colorcode
@undergraduate6050
@undergraduate6050 7 ай бұрын
How's it inefficient with memory management?
@nicolasseydoux5985
@nicolasseydoux5985 7 ай бұрын
Around 21 minutes , one thing you show unvoluntarily, is that you can put multiple same events on a same div . your wrote the event 'click' with a console.log . Your seemed to rewrite that click event with the nicely todo list working . testing it trigger what supposed to happen - copy the input text, putting it in the list, but also... the console.log !! . To summarize, you created 2 'clicks' events ! .
@ColorCodeio
@ColorCodeio 7 ай бұрын
Good catch!
@user-es2vr3cv1v
@user-es2vr3cv1v 6 ай бұрын
❤ can you make a video about Event loop and browser api, call stack and callback queue ( also interesting to know how it works )
@shameer9680
@shameer9680 7 ай бұрын
Thanks for this. Really great content. Btw what is kabab case 👼 (33:04)
@roysonkewalfernandes3061
@roysonkewalfernandes3061 7 ай бұрын
can u teach about Javascript Enum ?
@Yardan_gholi
@Yardan_gholi 7 ай бұрын
why did you put null as the first argument of bind and after that li ? what not just bind(li) ?
@ColorCodeio
@ColorCodeio 7 ай бұрын
The first argument passed to bind is the this keyword which we don't need in this example. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind
@TicTacTechYT
@TicTacTechYT 4 ай бұрын
MAKE MOre videos. We miss you
@erensametkaratas6593
@erensametkaratas6593 7 ай бұрын
WOW. Are we back?!?!
@ColorCodeio
@ColorCodeio 7 ай бұрын
We're back!
JavaScript Pure Functions - Tutorial for beginners
19:20
ColorCode
Рет қаралды 9 М.
Fetch API - JavaScript Tutorial for beginners
30:50
ColorCode
Рет қаралды 88 М.
I PEELED OFF THE CARDBOARD WATERMELON!#asmr
00:56
HAYATAKU はやたく
Рет қаралды 38 МЛН
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 189 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 118 #shorts
00:30
JavaScript Promises  -- Tutorial for Beginners
37:05
ColorCode
Рет қаралды 104 М.
Javascript ES7 - Async / Await in under 3 minutes
2:45
Andrew Del Prete
Рет қаралды 39 М.
Arrow Functions JavaScript Tutorial - What NOT to do!!!
31:48
ColorCode
Рет қаралды 51 М.
What is Factory Function in JavaScript? - JS Tutorial
17:31
ColorCode
Рет қаралды 53 М.
Learn Web Components In 25 Minutes
24:21
Web Dev Simplified
Рет қаралды 186 М.
What Exactly Are Nodes In The JavaScript DOM?
10:37
dcode
Рет қаралды 3,7 М.
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 45 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 145 М.
Async Await vs. Promises - JavaScript Tutorial for beginners
24:30
Обзор игрового компьютера Макса 2в1
23:34
Samsung or iPhone
0:19
rishton vines😇
Рет қаралды 8 МЛН
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 4,6 МЛН