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


Groups > comp.lang.javascript > #31508

Re: How to write object-oriented JS function?

From John Harris <niam@jghnorth.org.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: How to write object-oriented JS function?
Date 2016-10-04 16:49 +0100
Organization A noiseless patient Spider
Message-ID <rqj7vbht8u37phen4abraktsnidtvjttts@4ax.com> (permalink)
References (7 earlier) <nsulmk$ufa$1@dont-email.me> <nsum2m$ufa$2@dont-email.me> <XnsA6975E517EC5Eeejj99@194.109.6.166> <nsvmo2$77a$1@dont-email.me> <XnsA697980D06A07eejj99@194.109.6.166>

Show all headers | View raw


On Tue, 04 Oct 2016 14:56:49 +0200, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:

>$Bill <news@todbe.com> wrote on 04 Oct 2016 in comp.lang.javascript:
>
>> On 10-04-16 00:16, Evertjan. wrote:
>>> $Bill <news@todbe.com> wrote on 04 Oct 2016 in comp.lang.javascript:
>>>
>>>> On 10-03-16 15:22, $Bill wrote:
>>>>> On 10-03-16 14:46, Evertjan. wrote:
>>> [..]
>>>>>> Same problem:
>>>>>>
>>>>>> jag.cnt = 1;
>>>>>> if (jag.cnt == 20)
>>>>>>
>>>>>> Seems to me NOW the if-condition is NEVER true.
>>>>>
>>>>> Unless there's an increment of jag.cnt like below.
>>>>
>>>> PS: And the two stmts aren't literally following each other as shown.
>>>
>>> Ah yes: "Unless the code is different".
>>>
>>> In another field, that is called "apologetics" ;-)
>> 
>> No, it's called clarification of an assumption I made.  I don't believe
>> for a second that those two stmts literally follow each other in the
>> actual code, but you can never be sure can you.
>
>Quite. 

The code in the first article of this thread said

		if (cnt == 20) { return }
		
		cnt += 1;

and what I said in my article showing how to access the now
semi-global cnt variable was

  jag.cnt = 1;
  if (jag.cnt == 1)
  etc.

so it's obviously a bit more than quite.

  John

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


Thread

How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-09-30 09:55 -0700
  Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-01 15:16 +0100
    Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-01 09:23 -0700
      Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-02 11:27 +0100
        Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-02 04:22 -0700
        Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-02 11:27 -0700
          Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-03 10:26 +0100
            Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-03 10:38 +0100
              Re: How to write object-oriented JS function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-03 12:01 +0200
                Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-03 19:07 +0100
                Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-03 14:33 -0700
                Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-04 17:59 +0100
                Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-04 20:10 -0700
                Re: How to write object-oriented JS function? justaguy <lichunshen84@gmail.com> - 2016-10-05 04:47 -0700
                Re: How to write object-oriented JS function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-03 23:46 +0200
                Re: How to write object-oriented JS function? $Bill <news@todbe.com> - 2016-10-03 15:22 -0700
                Re: How to write object-oriented JS function? $Bill <news@todbe.com> - 2016-10-03 15:28 -0700
                Re: How to write object-oriented JS function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-04 09:16 +0200
                Re: How to write object-oriented JS function? $Bill <news@todbe.com> - 2016-10-04 00:46 -0700
                Re: How to write object-oriented JS function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-04 14:56 +0200
                Re: How to write object-oriented JS function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-04 16:49 +0100
                Re: How to write object-oriented JS function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-04 19:55 +0200

csiph-web