Re: [JSMentors] Re: I'm trying to write better JavaScript and I'm looking for some feedback on the code I wrote for a small app.

2011-10-07 Thread Nick Morgan
On 7 October 2011 12:10, Lasse Reichstein wrote: > On Fri, Oct 7, 2011 at 12:09 PM, Fyodorov "bga" Alexander > wrote: >> >> >> reason why many js coders still use ; is because they use other old >> langs such as c++/java. New langs such as Go and Scala dont requires ; >> because in most cases \n

Re: [JSMentors] Re: I'm trying to write better JavaScript and I'm looking for some feedback on the code I wrote for a small app.

2011-10-07 Thread Lasse Reichstein
On Fri, Oct 7, 2011 at 12:09 PM, Fyodorov "bga" Alexander wrote: > > > reason why many js coders still use ; is because they use other old > langs such as c++/java. New langs such as Go and Scala dont requires ; > because in most cases \n is ;. I agree on that, and in a language designed to not n

Re: [JSMentors] Re: I'm trying to write better JavaScript and I'm looking for some feedback on the code I wrote for a small app.

2011-10-07 Thread Fyodorov "bga" Alexander
Lasse Reichstein: > On Thu, Oct 6, 2011 at 2:17 PM, Fyodorov "bga" Alexander < > bga.em...@gmail.com> wrote: > > > > > 1) convert your code to > > { > > const singletonObject = (function(){ > >// helper fns > > > >return { > > // privare members > > newsItems_: [], > > > >