You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, OatyArray is built as a class with internal methods, but to match Array it should be a function with OatyArray.prototype methods, e.g. OatyArray.prototype.push(). This has benefits, such as that all OatyArray instance methods are references to the prototype implementation.
This post does a great job of explaining how prototypes work and how to implement them.
The text was updated successfully, but these errors were encountered:
At the moment,
OatyArray
is built as a class with internal methods, but to matchArray
it should be a function withOatyArray.prototype
methods, e.g.OatyArray.prototype.push()
. This has benefits, such as that allOatyArray
instance methods are references to the prototype implementation.This post does a great job of explaining how prototypes work and how to implement them.
The text was updated successfully, but these errors were encountered: