Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
igl
on Dec 8, 2014
|
parent
|
context
|
favorite
| on:
“This” in JavaScript
In short: this is a reference to a functions context. If no context is present it points to the global context or if encapsulated to undefined.
context.func() //this == context
func() // this == global
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
context.func() //this == context
func() // this == global