diff --git a/archive/v0.1/getting-started.html b/archive/v0.1/getting-started.html index b19cfafe..b63cb2e4 100644 --- a/archive/v0.1/getting-started.html +++ b/archive/v0.1/getting-started.html @@ -81,16 +81,16 @@ todo.Todo = function(data) { todo.TodoList = Array;
m.prop is simply a factory for a getter-setter function. Getter-setters work like this:
//define a getter-setter with initial value `John`
-var firstName = m.prop("John");
+var name = m.prop("John");
//read the value
-var a = firstName(); //a == "John"
+var a = name(); //a == "John"
//set the value to `Mary`
-firstName("Mary"); //Mary
+name("Mary"); //Mary
//read the value
-var b = firstName(); //b == "Mary"
+var b = name(); //b == "Mary"
Note that the Todo and TodoList classes we defined above are plain vanilla Javascript constructors. They can be initialized and used like this:
var myTask = new todo.Todo({description: "Write code"});
@@ -442,4 +442,4 @@ this.description = function(value) {