Skip to content

javascript, call, apply, bind, setPrototypeOf, proto simple explanation

Notifications You must be signed in to change notification settings

catkim/callApplyBindProto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

callApplyBindProto

I made this repo to go over Call, Apply, Bind and Prototypical Inheritance in simple terms using object literals because I mostly work with simple objects. I've been using these methods for years and understood the concept of explicitly setting "this" using call. I also knew that you can use call to convert a collection of HTML elements to array like this: let buttonsArray = [].slice.call(document.querySelectAll('button'))

To me it was a bit confusing seeing call used in both ways. I wanted to feel more confident using these methods so I did some reading, watched some great videos, and played around with code until I felt I had a more solid understanding. Hopefully you will too after looking over my code and I'll leave the links to the videos.

Read the comments and then remove this text one line at a time, save and check console log: // ----> remove double backslash and instruction <---

links to videos:

https://www.youtube.com/watch?v=c0mLRpw-9rI -- call apply bind - Techsith (this guy is great!) https://www.youtube.com/watch?v=YkoelSTUy7A&t=1s -- Prototype basics - FunFunFunction - (he's great too) https://www.youtube.com/watch?v=g2WcckBB_q0 -- Bind Explained in Javascript

About

javascript, call, apply, bind, setPrototypeOf, proto simple explanation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published