How Arrow Functions And this Work In JavaScript, Codecademy's Advanced Objects, Free JavaScript Tips

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=-NhO9cXvBsY



Duration: 3:12
85 views
4


In this JavaScript lesson, we look at, How Arrow Functions And this Work In JavaScript, Codecademy's Advanced Objects, Free JavaScript Tips. This is based on the lesson, "Arrow Functions and this". In it we learn that we should not use arrow function syntax when creating methods in our objects. We learn that it is best practice to use good old fashion function expression. We are told we are free to use either longhand or shorthand syntax format. Make sure to learn why we are not able to use arrow functions when declaring methods in our objects. We are told this is because arrow functions inherently will bind, or also called "tie", a this value that has already been defined to the function itself which is not the calling object! The value of our "this" is the global object which does not have the property we ask for within our arrow function methods. For this reason, using function expressions is the answer to our problems! Make sure to understand how arrow functions and this work before moving on to the next lessons. The this keyword is a vital JavaScript programming fundamental that any programmer should understand! The this keywords is Especially useful for web developers to understand. Make sure to practice using the this keyword and get use to writing methods in your objects using the this keyword regularly!




Other Videos By We Will Code


2022-03-25Intro to JavaScript Classes, What are Classes in JavaScript, Use JavaScript Classes, JS Codecademy
2022-03-25Learn Intermediate JavaScript on Codecademy, How to Learn Intermediate JavaScript, Course Overview
2022-03-24Advanced Objects Review, Learn JavaScript Codecademy 2022 How to Program with JavaScript Full Course
2022-03-24Using Built-in Object Methods in JavaScript, Codecademy's Learn JavaScript Built-in Object Methods
2022-03-24Destructured Assignment Explained, Learn JavaScript ES6 Destructured Assignment on Codecademy JS ES6
2022-03-24Property Value Shorthand, Advanced Objects in JavaScript, Codecademy Learn JS, ES6 Destructuring
2022-03-23What are Factory Functions, How to Create Factory Functions in JavaScript, Codecademy's Learn JS
2022-03-23JavaScript Setter Methods Explained, Examples of Setter Methods in JavaScript, Codecademy Learn JS
2022-03-22Understanding JavaScript Getter Method, Using JavaScript Getters Method, Codecademy Learn JavaScript
2022-03-22How Privacy Works in JavaScript, Codecademy Learn JavaScript Object Privacy, Object Property Privacy
2022-03-21How Arrow Functions And this Work In JavaScript, Codecademy's Advanced Objects, Free JavaScript Tips
2022-03-21Learn How The this Keyword Works in JavaScript, Advanced Objects on Codecademy, Learn JavaScript
2022-03-21Learn JavaScript on Codecademy, Objects Section, Review Lesson, JavaScript Object Review, Learn JS
2022-03-21My Newest PS5 Game 2022, Plague Tale Innocence Walkthrough, Ch 1 The de Rune Legacy Beginners Guide
2022-03-20Looping Through Objects in JavaScript on Codecademy's Learn JavaScript, How to Loop Through Objects
2022-03-20Inner Self-Healing, Zen Instrumentals, Deep Calm Meditation Music to Relax, Sounds for Healing
2022-03-19JavaScript Objects Pass By Reference, Codecademy, Passing Variables Assigned to Objects as Arguments
2022-03-19Trippy Music Instrumentals, Trippy Relaxing Music to Listen To, Calm Uplifting Beats for Sleep
2022-03-19We Will Code Live Stream
2022-03-19Accessing Nested Objects with JavaScript, Codecademy's Learn JavaScript, Array with Multiple Objects
2022-03-18Learn How to Create Object Methods in JavaScript, Writing Object Methods In JavaScript on Codecademy



Tags:
Coding
ES6
JS
JavaScript
Programming
Tutorials