How to understand `JavaScript static methods are also not callable when the class is instantiated` -


i read on mdn. original is:

the static keyword 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

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -