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

preview_player
Показать описание
#Javascript #Tutorial #Hindi

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:
Рекомендации по теме
Комментарии
Автор

Some people teach it in a very complex way. But you teach it straightforward way. Thank you, sir.

saykathbiswas
Автор

Watched many videos on YouTube, and my confusion about "this" keyword wasn't solved however now I am feeling confident about "this" keyword after watching this video. Thank you so much

rakeshkumarparida
Автор

bhaiSahab....continuously 4 video dekhe this keyword par ghanta kisi ka nhi samajh aaya....or bhaiya ji aapne ek hi baari me acche se samjha diya...dil se sukriya ❤

NiteshKumar-dnem
Автор

instant like, instant subscribe, and bookmarked you channel as everyone says you the best teacher yes i agree

harshjha
Автор

Awesome way of i am here for revision JS and really enjoyed all your videos and learn more useful new features.

afsarali
Автор

Sir you are a best teacher ever ❤️❤️❤️

dineshgadhavi
Автор

Thank you so much sir, bahut easily explain kar dia apne.

jagdishjena
Автор

Really simple and straight forward explanation. Thank you sir ❤👍

thedevlife
Автор

I Must Say Bohot Accha Tha Apka Explanation ❤️👌
Thank You Sir !

rajbiswas
Автор

aap bahut aache se samjate hai. ek hi bar mein samaj aa jata hai

anshikasingh
Автор

Really Awesome Sir I have watched many videos but truly said you clear my all confusion related to this keyword

akifff
Автор

Your video is very good
Next Part Upload *Part - 29*

mehboobkhan
Автор

Sir Java k Lecture agr complete ho gy hain to Sir is ko ek video ma uplaod kar dy jeisy HTML Or CSS k hian Or wo buhat Amazing hain i slute ur Efforts. so much love and respect for U Sir....

razaahmad
Автор

Sir photoshop sai website ko html mai kysai convert kr saktai hai, plz is pai video bana saktai hi

sahilrehman
Автор

This video is *helpful* sir (Keep it up)

ahmedseven
Автор

basically i don't comments
but you are the greatest teacher of the century for me
love you and u r videos

mr-k
Автор

Sir eagerly waiting for upcoming tutorials... Please provide us.

akshayshahane
Автор

Sir itne kam samay main apne concept kar diya, 👍🙏

leenakadam
Автор

U r teaching far better than paid courses by famous youtubers

prathamesh
Автор

this has been cleared credit goes to u bro

ugadgets