Thursday, September 14, 2017

Answers to Dummies

Why JavaScript classes have only methods?

Because a class definition always defines prototype methods. Class variables are possible, but you wouldn't use prototype to set them.

What is a callback function?

Developer will call a method and pass a function (as an argument) that will get called back by the underlying implementation.

No comments:

Post a Comment