I see one issue here: prototype methods are defined by assigning to .prototype,

In defining them as “this.method” in the constructor, you create enumerable own properties (object.hasOwnProperty(“method”) returns true)…Continue reading on Medium »

Link: https://medium.com/@chrisvandomelen/i-see-one-issue-here-prototype-methods-are-defined-by-assigning-to-constructor-prototype-bd19db988fe2?source=rss——javascript-5