Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27255
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Javascript classes. Please take a look at my question. |
| Date | 2015-04-09 01:48 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mg4lqa$2sr$6@dont-email.me> (permalink) |
| References | <e7563f81-a11d-4d56-a61a-c0c84f966c3e@googlegroups.com> <mg456a$2sr$4@dont-email.me> <mg47u5$9q8$1@solani.org> |
On Wed, 08 Apr 2015 23:52:10 +0200, Christoph M. Becker wrote: > Denis McMahon wrote: > >> I haven't tested the following code, but it might return a result >> object that either contains the results you want, garbage, or a single >> error attribute. > > <snip> > >> Sorry it's not a class object, but I've never really grokked the whole >> emulate OOP with javascript using functions as classes thing[1]. > > It appears that the function can be used as constructor function and > called with `new election([...])`, so all is well. ;) Also the OP will need to deduce the form of the object supplied to the function by inspection of the code. That's probably going to be almost as much work as writing his own code, or more by the time he looks everything up to understand what's happening at the level that his teacher will expect him to be able to explain it. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Javascript classes. Please take a look at my question. Rahul Reddy <rahulreddy160@gmail.com> - 2015-04-08 10:44 -0700
Re: Javascript classes. Please take a look at my question. "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-08 22:49 +0200
Re: Javascript classes. Please take a look at my question. Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-08 21:05 +0000
Re: Javascript classes. Please take a look at my question. "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-08 23:52 +0200
Re: Javascript classes. Please take a look at my question. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-09 01:31 +0200
Re: Javascript classes. Please take a look at my question. "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-09 16:31 +0200
Re: Javascript classes. Please take a look at my question. Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-09 01:48 +0000
Re: Javascript classes. Please take a look at my question. John Harris <niam@jghnorth.org.uk.invalid> - 2015-04-09 09:24 +0100
csiph-web