Skip to content

Commit

Permalink
Merge pull request #10 from Gozala/pr/9
Browse files Browse the repository at this point in the history
#9 Corrected spelling/grammar/missing words
  • Loading branch information
posva committed Mar 1, 2015
2 parents fe82805 + 45ff378 commit 6d69795
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://secure.travis-ci.org/Gozala/selfish.png)](http://travis-ci.org/Gozala/selfish)

Class-free, pure prototypal inheritance that lets write expressive,
Class-free, pure prototypal inheritance that lets you write expressive,
well-structured code, without ever touching special `prototype` properties
or `new`, `instanceof` operators.

Expand All @@ -20,14 +20,14 @@ or `new`, `instanceof` operators.

```js
// Instead of creating classes, you create prototype objects. Let's look
// at the simle example first:
// at this simple example first:
var Dog = Base.extend({
bark: function() {
return 'Ruff! Ruff!'
}
})

// Forget about classes, javascript is prototypal language:
// Forget about classes, javascript is a prototypal language:
typeof Dog // object

// Forget about special `new` operator, just use a maker function:
Expand Down Expand Up @@ -139,12 +139,12 @@ var Pixel = Color.extend({

var pixel = Pixel.new(11, 23, 'CC3399')
pixel.toString() // 11:23@#CC3399
Pixel.isPrototypeOf(pixel)
Pixel.isPrototypeOf(pixel) // true

// Pixel instances inhertis from `Color`
Color.isPrototypeOf(pixel) // true

// In fact `Pixel` itself inherits from `Color`, remember just simple and
// pure prototypal inheritance where object inherit from objects.
Color.isPrototypeOf(Pixel)
// pure prototypal inheritance where objects inherit from objects.
Color.isPrototypeOf(Pixel) // true
```

0 comments on commit 6d69795

Please sign in to comment.