On this podcast we talk about the function prototype method apply. Function dot apply is used to set the this context in the function is invoked for.  Here are some quick code examples for Function.apply():


const x = {a: 42, b: 15};

function myFunction() {
  return this.a + this.b;

// returns 57


Useful Links:






Leave a Reply

Your email address will not be published. Required fields are marked *

Fullstack Javascript Podcast © 2017