mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 02:50:10 +00:00
tweaking docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fc756eb5f3
commit
604dda2381
@ -140,15 +140,7 @@ Create a basic constructor...
|
||||
```javascript
|
||||
// NOTE: new is optional here...
|
||||
var A = new object.Constructor('A')
|
||||
```
|
||||
|
||||
|
||||
In _JavaScript_ constructor `B` inherits from constructor `A` iff
|
||||
`A.prototype` is _prototype_ of `B.prototype`. So to implement inheritance
|
||||
we simply need to _link_ the prototypes of two constructors via `.__proto__`,
|
||||
`Object.create(..)` or other means.
|
||||
|
||||
```javascript
|
||||
var B = object.Constructor('B', A, {})
|
||||
|
||||
var C = object.Constructor('C', B, {})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user