Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: NEVER use "this" as a variable Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Date: Wed, 14 Aug 2019 08:47:59 +0200 Lines: 21 Message-ID: References: <7289e763-fc8c-4686-8f68-12094ee06440@googlegroups.com> <7fc94d37-a44c-43a0-bb81-b9116f9d20fa@googlegroups.com> <0c7e3cae-3c01-4ca8-a2e9-db004a2de1b8@googlegroups.com> <05dbfbb6-648f-4cbf-89e6-7fb1d1e3b44e@googlegroups.com> <25a5b812-2599-492a-856c-b052f9024d4d@googlegroups.com> <26c701d7-cb23-44f2-9ca2-b4c30b888030@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net 1dd52aNAhvEjG4FuygQytAGsoTFCYnWuz/9EF5dcXvqVbvxm+z Cancel-Lock: sha1:wkaXjiJPJU7om4vaWQkTxPzzl+8= Openpgp: preference=signencrypt In-Reply-To: Xref: csiph.com comp.lang.javascript:37131 R.Wieser: > Arno, > >> It's the same reason why you should not name a variable >> "document" or "window". "this" *is* already something >> and therefore you should use this name for a variable. > > As I already tried to make clear, I do not see any difference between the > "that" variable in my example, and the "this","document" or "window" ones > (all can be mixed up in the same way). You do. So, what /is/ that > difference ? The difference is, that "this", "document" and "window" name an *existing* object and "that" not. -- Arno Welzel https://arnowelzel.de