getify / You-Dont-Know-JS

A book series on JavaScript. @YDKJS on twitter.
Other
179.26k stars 33.48k forks source link

Objects & Classes - 2nd Edition - Ch. 4 - point.init(...) is not a constructor #1801

Closed BigKamil5 closed 2 years ago

BigKamil5 commented 2 years ago

Please type "I already searched for this issue": I already searched for this issue.

Edition: (1st or 2nd) 2nd

Book Title: Objects & Classes

Chapter: Chapter 4: This Works

Section Title: New Context Invocation

Problem:

var anotherPoint = new point.init(3,4);

This line of code throws an error. point.init(...) is not a constructor

getify commented 2 years ago

Thanks, there's a bit of nuance I hadn't explained, but I addressed it now.