This keyword | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

This keyword

I've watched many videos and tutorial about this keyword but until now i can understand exactly what does it mean .?

14th Aug 2020, 1:14 PM
Taib Rasheed
Taib Rasheed - avatar
2 Answers
+ 2
"this" keyword is used for accessing objects. The "this" keyword references directly the object name, and even when the object variable value get changed it can still be accessed if there are other references to that object. I think below code should be able to help. https://code.sololearn.com/W9Q4hLE7FYFO/?ref=app
14th Aug 2020, 2:30 PM
Infinite
Infinite - avatar
+ 6
Taib Rasheed The 'this' keyword refers to the 'current object'. Note that 'this' is not a variable. It is a keyword, and its value cannot be changed. https://www.sololearn.com/discuss/1839464/?ref=app
14th Aug 2020, 1:31 PM
BroFar
BroFar - avatar