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