function a class? passing a function to another function? storing functions in an array? what on earth is a prototype?
You could also use babel and go for ES6 where it makes more sense. Or typescript.
yes, a function is a method. yes, a function is a class. yes, functions can be passed to other functions. yes, functions can be stored in arrays. a prototype is like a lookup chain for object properties: object a (has prototype of object b) accessing "a.prop" will first check if a has a property with name "prop", then check object b for the same name
Обсуждают сегодня