How to understand `JavaScript static methods are also not callable when the class is instantiated` -
i read on mdn. original is:
the
statickeyword defines static method class. static methods called without instantiating class , not callable when class instantiated.
i thought static in js similar static in java sentence in question confuses me.
it similar. however, java allows calling static methods on instance:
p1.distance(p1, p2); which same thing as
point.distance(p1, p2); the first 1 not allowed in javascript.
Comments
Post a Comment