Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #38 from jonelf/patch-1

Update 2013/02/prototypes.md
  • Loading branch information...
commit 9f324855c5a43e9d147b88e33b88c3a2aa17413b 2 parents 1e324f7 + 34c79c4
@raganwald raganwald authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 2013/02/prototypes.md
View
4 2013/02/prototypes.md
@@ -75,7 +75,7 @@ class Queue
end
```
-There is special sntax for defining a class, and special syntax for defining the behaviour of instances. There are different ways of defining the way new instances are created in classist languages. Ruby uses a "magic method" called `initialize`. Now let's look at JavaScript.
+There is special syntax for defining a class, and special syntax for defining the behaviour of instances. There are different ways of defining the way new instances are created in classist languages. Ruby uses a "magic method" called `initialize`. Now let's look at JavaScript.
### javascript has constructors and prototypes
@@ -100,7 +100,7 @@ As you can see, the `square` function will act as a constructor if you call it w
That's different from a true classical language, where the class is a special kind of object that creates new instances.
-How does JavaScript define the bahaviour of instances? JavaScript doesn't have a special syntax or special kind of object for that, it has "prototypes." Prototypes are objects, but unlike a classical system, there are no special methods or properties associated with a prototype. Any object can be a prototype, even an empty object. In fact, that's exactly what is associated with a constructor by default:
+How does JavaScript define the behaviour of instances? JavaScript doesn't have a special syntax or special kind of object for that, it has "prototypes." Prototypes are objects, but unlike a classical system, there are no special methods or properties associated with a prototype. Any object can be a prototype, even an empty object. In fact, that's exactly what is associated with a constructor by default:
```javascript
function Nullo () {};
Please sign in to comment.
Something went wrong with that request. Please try again.