The Importance of THIS in Javascript
ฝัง
- เผยแพร่เมื่อ 6 ก.ย. 2024
- Check out my web development courses here 🔥
developedbyed.com
In this video, we dive into the power of JavaScript's "this" keyword and explore how it can be used to create a simple library for DOM manipulation and animation. With the help of examples and explanations, you'll learn how to leverage "this" in combination with "apply", "call", and "bind" to build your own jQuery-like functionality.
We start by understanding the concept of "this" and its role in JavaScript. Then, we demonstrate how to create a lightweight library called miniQuery using the "this" keyword. The library allows you to select DOM elements, add classes dynamically, and apply fade-in and fade-out animations.
Throughout the video, we explain each step in detail and provide clear code examples. By the end, you'll have a solid understanding of "this", apply", "call", and "bind", as well as how to create your own DOM manipulation library.
Key topics covered in this video:
- Introduction to "this" keyword in JavaScript
- Exploring "apply", "call", and "bind"
- Building a lightweight library using "this"
- Selecting DOM elements and adding classes dynamically
- Creating fade-in and fade-out animations
🛴 Follow me on:
Twitch: / developedbyed
Twitter: / developedbyed
Instagram: / developedbyed
Github: github.com/dev...
#programming #javscript
Let's take a break from all these frameworks and focus on what actually matters... Javascript
Yes, a lot of people only know how to code with certain framework and not vanilla js which is totally weird
Nice one! "this" always becomes a headache
Please continue with this format. It's really fun and gooood 🔥
Great! Please keep up the series! Greetings from Ukraine, Buccha
Once I mastered “this”, I spent the rest of my js career actively trying to avoid its complexity and have not missed it.
please do more of these , thsi was really great
I have never wrap my head around the this keyword until this video. Short and concise. Thanks very much.
Thanks a lot bro
My favorite Dev
Thanks ED Really Appreciate Your Hard Work
20:28 you little svelty boyyy
Why do we need document.querySelectorAll.call(document, selector)? Isn't it just complicated version of document.querySelectorAll(selector)? I don't get it
What VS Code theme are you using? It's the best I've ever seen.
Thanks for always creating contents like these... ❤❤❤❤❤❤❤❤
you mean content like.this
I've recently built m first Javascript class for input validation, and it works brilliantly. 🥳 So much easier to maintain and manage.
This is great, and I guess that by saying "this" right now, I'm talking about the video...
For some reason some hours ago I was wondering about how jQuery was made, all those chain functions, I didn't expect to get the answer here.
Its a nice video but which i didn't get is : when you call the call back function after querySelectorAll . Does call back function (call) take more than 1 parameter ???
the pure web, awesome series
I love these! I've been coding for a few years and your videos are super helpful. So thank you 🙏
I love this video series! Thank you! Btw what’s your camera?
You are amazing. 💫
I learnt a lot.
Why would we want to use bind instead of just taking a parameter with an object and accessing the object properties from inside the function? Is there any advantage?
Bro you're on the level where someone breathes Code 😀😀😀😂 Thanks so much for the service we appreciate your tutorials🙏🙏
These small tips, explanations of plain javascript are excellent :)
Hey, do you use your drawing tablet as a second screen when coding?
Very helpful thanks😍
I think focusing in javaScript is a great decision. ❤✌
Thanks alot Ed, you're a gift to any aspiring or pro programmer and i enjoy this, much more i really do learn alot from your videos even though i cant comment on all of them or likes but worry not...opportunity will present itself at its time. keep up the good work!
I really appreciate these vanilla JS videos!
We can also do a 'return this' instead of 'return library' ✌🏼
yes Indeed
What theme do you use for VScode? I like it :)
Did you find out what the theme was called? I'm trying to figure it out as well.
i think its Atom one dark
What is your vscode theme
I've been learning JS in 1 year, but this concept of Call, Apply and Bind really made me confuse everytime. Thanks Ed for this explanation video!
great work im learning right by you ed! typescript is a yes for me
Love this type of content, and yeah I agree I love learning what's happening under the hood all of these JavaScript frameworks. And I love and need to learn about typescript so yes please!!! 😍
Hello Ed, i cannot find subtitle switcher like i watch your video on youtube. I want to buy this course but i'm not good at listening English, I need subtitle when watch video. Can you add subtitle on your website's course video.
Hi and thank you. Where do I can find console in edge browser?
Love this!
this was a spectacular video🔥
Thank you!
Very good, Ed!
Great 🥰
Amazing 😲
no one's ever called me a sexy sausage before.... i like it....
thank you♥
@developedbyed. Can you share your Gadget setups pls?
A breath of fresh air dudes got the formula down.
In ReactJs we dont have “this”, right?
I love watching you. :D
Pleaae make js videos that most use in javascript frameworks.
but with tailwind css
discord where????
there is no magic to these frameworks. They are just JS with some compiler magic :)))
Add chapters ed
Isn't jQuery also do that
Waiting for your redux full beginning to advance video 😢😢
use this comment replies to argue about next and svelte 🔥🔥
This could be a course 🥳🥹
😂bruh not the sausage
You didn't mention nuxt and Vue js 😂😂😂
your playlist is a mess...you have vids that are repeats of other vids...24,25,26,30,31,43,45
Get outta here! :D
are you 25?
what theme is that, please