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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -