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


Groups > comp.lang.javascript > #31551

Re: How to have multiple and undetermined number of arguments for function?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Jake Jarvis <pig_in_shoes@yahoo.com>
Newsgroups comp.lang.javascript
Subject Re: How to have multiple and undetermined number of arguments for function?
Date Mon, 10 Oct 2016 17:26:45 +0200
Organization A noiseless patient Spider
Lines 17
Message-ID <ntgbvb$5e0$1@dont-email.me> (permalink)
References <c8d1b70e-031e-4b10-a454-afee5d0c9590@googlegroups.com> <l4lkvb5qrrojvvt7h9f34g2b3rhp81pcki@4ax.com> <9abdc041-3977-470c-a886-b6ae885818c8@googlegroups.com> <87oa2ttk3f.fsf@bsb.me.uk> <441c0eb7-210d-4310-b58c-216a6a157dae@googlegroups.com> <XnsA69CEE721F5C2eejj99@194.109.6.166> <7112eabe-6254-4ac4-b2f2-ff9d3d6cff5e@googlegroups.com> <f50fbc4b-55b1-4e66-8745-e20fba0b54d8@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 10 Oct 2016 15:26:35 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="fd35fae88fbf15ee48976565c674b3aa"; logging-data="5568"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lk/n26dQXYQqYFAmXf+L1e4C+iDvysqM="
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
In-Reply-To <f50fbc4b-55b1-4e66-8745-e20fba0b54d8@googlegroups.com>
Cancel-Lock sha1:Lpwbvo99m3IQMDL8nZcX5GF0GIo=
Xref csiph.com comp.lang.javascript:31551

Show key headers only | View raw


Am 10.10.2016 um 16:57 schrieb justaguy:
> A related question.
>
> I have one array as an argument for my the function in question, such array reads as ['grantor_row2','input','text',70].
>
> In my loop for arguments, I have the following code with the intention of excluding this array,
> if (!arguments[counter][0].indexOf('_row2')) {
>  console.log(arguments[counter][0]);
> }
>
> But the console did not return the value of 'grantor_row2'.  What's wrong?
>
> Thanks.
>

You are actually checking if the first element starts with "_row2".

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


Thread

How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-08 14:48 -0700
  Re: How to have multiple and undetermined number of arguments for function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-09 00:07 +0200
    Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-08 16:03 -0700
      Re: How to have multiple and undetermined number of arguments for function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-09 09:59 +0200
  Re: How to have multiple and undetermined number of arguments for function? John Harris <niam@jghnorth.org.uk.invalid> - 2016-10-09 15:35 +0100
    Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-09 11:22 -0700
      Re: How to have multiple and undetermined number of arguments for function? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-09 20:09 +0100
        Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-09 13:32 -0700
          Re: How to have multiple and undetermined number of arguments for function? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-09 23:26 +0200
            Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-09 15:18 -0700
              Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-10 07:57 -0700
                Re: How to have multiple and undetermined number of arguments for function? Jake Jarvis <pig_in_shoes@yahoo.com> - 2016-10-10 17:26 +0200
                Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-10 08:50 -0700
                Re: How to have multiple and undetermined number of arguments for function? Jake Jarvis <pig_in_shoes@yahoo.com> - 2016-10-10 18:53 +0200
                Re: How to have multiple and undetermined number of arguments for function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-10-10 18:22 +0100
                Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-10 11:20 -0700
                Re: How to have multiple and undetermined number of arguments for function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-10-10 17:28 +0100
  Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-09 11:20 -0700
    Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-09 12:10 -0700
  Re: How to have multiple and undetermined number of arguments for function? justaguy <lichunshen84@gmail.com> - 2016-10-10 17:05 -0700

csiph-web