Skip to content
loading...

Reading Snippets [47 => This] 👉

github logo ・1 min read  

"This" is used differently in JavaScript from how it is used in most other programming languages.

The five ways "This" can be used in JavaScript include:

  • In a global scope to refer to the global object

  • To refer to the global function when calling a function

  • Calling a method

  • To refer to a newly created object when calling a constructor

  • Explicit setting to the first argument of a corresponding function call

Source:JavaScript Garden

twitter logo DISCUSS
Classic DEV Post from Dec 14 '19

Python coders, what are some exercises/activities that help you quickly get better at the basic coding?

Calvin profile image
Coding for good

Hey there reader...

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️