From f979e9e37ad6b3de59e42a5b151a936434d4d716 Mon Sep 17 00:00:00 2001 From: Aravind Karteek <99467993+aravindkarteekr@users.noreply.github.com> Date: Thu, 21 Aug 2025 11:43:49 +0530 Subject: [PATCH] Update en-US.mdx Update the description regarding the `this` in class bodies. This make it explicit that that all parts of class is strict by default --- questions/explain-how-this-works-in-javascript/en-US.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/questions/explain-how-this-works-in-javascript/en-US.mdx b/questions/explain-how-this-works-in-javascript/en-US.mdx index 2cff215..428033c 100644 --- a/questions/explain-how-this-works-in-javascript/en-US.mdx +++ b/questions/explain-how-this-works-in-javascript/en-US.mdx @@ -105,7 +105,9 @@ const person = new Person('John'); person.showThis(); // PersonĀ {name: 'John'} const showThisStandalone = person.showThis; -showThisStandalone(); // `undefined` because all parts of a class' body are strict mode. +showThisStandalone(); // `undefined` because in JavaScript class bodies, all methods are in strict mode by default, even if you don't add 'use strict'. + + ``` ### Explicitly binding `this`