News for hackers. Stuff that matters.
Re:Composing Programs – An introduction to programming in th... by jakear on Tuesday July 31, 2018 @01:01PM (#17654875)
The bug I had was declaring variables in the body of a class without `self.`. Turns out that makes them static. Ironically similar to JS making non prefixed declarations global, except I received no in editor warnings about that, and it wasn’t something beaten into my head from the day I started.

Edit: or was it that I initialized them at time of declaration rather than in the constructor? Not sure. Something along those lines.

Re:Composing Programs – An introduction to programming in th... by hannofcart on Tuesday July 31, 2018 @02:54PM (#17655945)
Most of the issues I find people annoyed with in JS are becoming less of an issue with modern idiomatic JS that is less object oriented, more functional and with ES6 utilities replacing more troublesome legacy idioms. I work on a fairly large app that uses little no classes. Also, I haven't had to use hasOwnProperty in a year! I just use Object.keys()