Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Object oriented programming Date: Sat, 06 Jan 2018 17:42:22 +0000 Organization: A noiseless patient Spider Lines: 26 Message-ID: <87a7xq6g01.fsf@bsb.me.uk> References: <3c2333ff-00fe-4087-ab49-f52d0546b29b@googlegroups.com> <41aa51ac-693c-44ab-9bae-db0b661ba9df@googlegroups.com> <431c000b-abb7-4dc1-a692-35d29b6f9456@googlegroups.com> <409a0b82-3074-4c3e-96a3-5c03c25037f9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="587485385f6d72d00828a4bc124d714e"; logging-data="15589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GIBAmivBWTVy+Z/D7jr+MbLaLefUepls=" Cancel-Lock: sha1:25uibJn3N2smbWBhgm8qy0P1q28= sha1:2/h8bVxJ2eqAKXvM4cSP8/tEpro= X-BSB-Auth: 1.ec91cc977ba7e036c1ce.20180106174222GMT.87a7xq6g01.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:34487 Julio Di Egidio writes: > On Saturday, January 6, 2018 at 11:23:16 AM UTC+1, Jonas Thörnvall wrote: > >> var inputs = midi.inputs.values(); >> >> Is midi.input.values(); a function or a method? > > There are no methods in JS, only functions, in fact closures. From section 4.2 of the ECMA 262 language specification: "A function that is associated with an object via a property is called a method." (in all the editions I've so far checked from 5.1 to 8). > ... OTOH a language spec as well as some good enough tutorials are not > that difficult to find really: > > This site, too, talks about methods. -- Ben.