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


Groups > comp.lang.javascript > #31542

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

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: How to have multiple and undetermined number of arguments for function?
Date 2016-10-09 20:09 +0100
Organization A noiseless patient Spider
Message-ID <87oa2ttk3f.fsf@bsb.me.uk> (permalink)
References <c8d1b70e-031e-4b10-a454-afee5d0c9590@googlegroups.com> <l4lkvb5qrrojvvt7h9f34g2b3rhp81pcki@4ax.com> <9abdc041-3977-470c-a886-b6ae885818c8@googlegroups.com>

Show all headers | View raw


justaguy <lichunshen84@gmail.com> writes:

Please don't top post...

> I attempted with the idea of taking an array as one argument without
> success, for instance,
> addSectionFunction([arg1,input,60],[arg2,input,15])

That's not "an array as one argument".  That's two arrays and two
arguments.

> Not doable?

All such argument schemes are possible: multiple non-array arguments,
one single array argument, multiple arrays arguments, multiple arrays of
arrays or arrays of arguments -- you name it.

Did you read the MDN reference the was posted?  Did it not give you
basic mechanisms to do what you want?

<snip>
-- 
Ben.

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