Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27951
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: permuting a JS vector |
| Date | 2015-05-31 22:42 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87twusfmpb.fsf@bsb.me.uk> (permalink) |
| References | <47b347a2-ab29-4722-963c-2c616ca7095c@googlegroups.com> <87a8wkh7jq.fsf@bsb.me.uk> <cd94f6d2-5475-40c9-b161-354e3cf2f20f@googlegroups.com> |
dr.mtarver@gmail.com writes: > On Sunday, May 31, 2015 at 8:27:22 PM UTC+1, Ben Bacarisse wrote: <snip> >>[...] The push function returns the new array length, >> not an array. This last one is why you get the error. >> > ah - a side-effect function then - that mutates an array but returns > number? Yes. You'll need a reference if you are learning JavaScript as you can't really guess. For example: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
permuting a JS vector dr.mtarver@gmail.com - 2015-05-31 11:45 -0700
Re: permuting a JS vector Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-31 20:27 +0100
Re: permuting a JS vector dr.mtarver@gmail.com - 2015-05-31 13:09 -0700
Re: permuting a JS vector Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-31 22:42 +0100
Re: permuting a JS vector wolfgang zeidler <invalid@invalid.invalid> - 2015-06-01 20:33 +0200
Re: permuting a JS vector Scott Sauyet <scott.sauyet@gmail.com> - 2015-06-05 13:12 -0700
csiph-web