005.5 – Javascript Pro Tip – Function.apply()

005.5 – Javascript Pro Tip – Function.apply()

Released Monday, 30th October 2017
Good episode? Give it some love!
005.5 – Javascript Pro Tip – Function.apply()

005.5 – Javascript Pro Tip – Function.apply()

005.5 – Javascript Pro Tip – Function.apply()

005.5 – Javascript Pro Tip – Function.apply()

Monday, 30th October 2017
Good episode? Give it some love!
Rate Episode
List

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;}myFunction.apply(x)// returns 57

 

Useful Links:

MDN

 

 

 

 

The post 005.5 – Javascript Pro Tip – Function.apply() appeared first on Full Stack Javascript Podcast.

Show More