Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37114

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.

From Arno Welzel <usenet@arnowelzel.de>
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 2019-08-13 15:06 +0200
Message-ID <grfqv2Fd6scU1@mid.individual.net> (permalink)
References (9 earlier) <qiopp9$1lea$1@gioia.aioe.org> <grarq0FaqaoU3@mid.individual.net> <qipma1$1j4v$2@gioia.aioe.org> <grcphoFngkiU1@mid.individual.net> <qisja6$drj$1@gioia.aioe.org>

Show all headers | View raw


On 12.08.19 22:48, R.Wieser wrote:
> Arno,
> 
>> Then just don't use it as a variable name.
> 
> I have still not seen any reason why I would do that I'm afraid.   Other 
[...]

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.

See
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this>.

And if you don't understand that article don't use "this" as variable
name without understanding why - just don't do it.



-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-08 16:50 -0700
  Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-08 16:55 -0700
  Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-08-09 00:16 -0700
    Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Julio Di Egidio <julio@diegidio.name> - 2019-08-09 00:46 -0700
      Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-10 02:03 -0700
        Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-10 11:12 +0200
      Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-10 02:08 -0700
        Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Julio Di Egidio <julio@diegidio.name> - 2019-08-10 03:14 -0700
          Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-10 16:32 -0700
            Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-10 16:36 -0700
            Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. dr.j.r.stockton@gmail.com - 2019-08-11 01:39 -0700
              Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-11 02:38 -0700
                NEVER use "this" as a variable Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-11 11:58 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-11 12:13 +0200
                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. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-11 12:31 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-11 20:15 +0200
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-11 17:50 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-11 20:20 +0200
                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. dr.j.r.stockton@gmail.com - 2019-08-11 13:54 -0700
                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. "R.Wieser" <address@not.available> - 2019-08-12 08:48 +0200
                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. dr.j.r.stockton@gmail.com - 2019-08-13 14:43 -0700
                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. "R.Wieser" <address@not.available> - 2019-08-14 08:43 +0200
                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. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-12 12:13 +0200
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-12 11:24 +0200
                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. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-12 12:14 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-12 12:42 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-12 22:48 +0200
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-13 15:06 +0200
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-13 15:07 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-13 20:22 +0200
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-14 08:47 +0200
                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. "R.Wieser" <address@not.available> - 2019-08-14 10:23 +0200
                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. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-08-14 13:45 +0100
                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. "R.Wieser" <address@not.available> - 2019-08-14 15:10 +0200
                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. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-08-15 00:42 +0100
                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. Julio Di Egidio <julio@diegidio.name> - 2019-08-14 20:51 -0700
                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. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-08-15 14:12 +0100
                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. "R.Wieser" <address@not.available> - 2019-08-15 09:09 +0200
                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. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-08-15 14:11 +0100
                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. "R.Wieser" <address@not.available> - 2019-08-15 17:34 +0200
                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. Julio Di Egidio <julio@diegidio.name> - 2019-08-19 10:43 -0700
                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. Arno Welzel <usenet@arnowelzel.de> - 2019-08-14 17:25 +0200
                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. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-14 13:10 -0700
            Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Julio Di Egidio <julio@diegidio.name> - 2019-08-12 09:30 -0700
              Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-12 11:55 -0700
                Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-12 11:58 -0700
          Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-08-10 18:48 -0700
            Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-08-11 16:25 +0100
              Extracting numbers from strings, using templates (was: Is the input type ID passed as a parameter onChange? If not how can i achieve it.) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-12 22:10 +0200
                Re: Extracting numbers from strings, using templates (was: Is the input type ID passed as a parameter onChange? If not how can i achieve it.) Jon Ribbens <jon+usenet@unequivocal.eu> - 2019-08-13 00:23 +0000
  Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Arno Welzel <usenet@arnowelzel.de> - 2019-08-09 11:59 +0200
    Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-09 13:54 +0200
      Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Arno Welzel <usenet@arnowelzel.de> - 2019-08-09 14:53 +0200
        Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-08-09 15:35 +0200
          Re: Is the input type ID passed as a parameter onChange? If not how can i achieve it. Arno Welzel <usenet@arnowelzel.de> - 2019-08-09 17:16 +0200

csiph-web