Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
JavaScript Tutorial in Hindi for Beginners [Part 28] - The JavaScript "this" Keyword
Play lesson

JavaScript Tutorial in Hindi - JavaScript Tutorial in Hindi for Beginners [Part 28] - The JavaScript "this" Keyword

4.0 (0)
6 learners

What you'll learn

This course includes

  • 23.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#Javascript #Tutorial #Hindi Link for Complete JavaScript Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSvHo6Rp4Ky0X8x_MabmKye Link for Complete HTML and CSS Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSdLVVjU_kea8J8lP24ZseT In this video i will talk about The JavaScript this Keyword. A function's this keyword behaves a little differently in JavaScript compared to other languages. It also has some differences between strict mode and non-strict mode. In most cases, the value of this is determined by how a function is called (runtime binding). It can't be set by assignment during execution, and it may be different each time the function is called. ES5 introduced the bind() method to set the value of a function's this regardless of how it's called, and ES2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context). The JavaScript this keyword refers to the object it belongs to. It has different values depending on where it is used: In a method, this refers to the owner object. Alone, this refers to the global object. In a function, this refers to the global object. In a function, in strict mode, this is undefined. In an event, this refers to the element that received the event. Methods like call(), and apply() can refer this to any object. Join this channel to support Tech Gun: https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g/join

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere