How 'this' Works in JavaScript: Decided by the Call, Not the Code'this' in JavaScript depends on how a function is called, not where it's written. Four rules and one arrow-function exception cover every case.Nov 10, 20263 min read