Skip to content

Commit 4d9e33d

Browse files
committed
Update index.html
Clarified line 197 by adding a few commas to provide natural pauses to increase readability. I am new to Backbone and think this is a great resource. I changed: So we can bind the change listener to individual attributes or if we like simply 'this.on("change", function(model){});' to listen for changes to all attributes of the model. to So we can bind the change listener to individual attributes, or, if we like, simply 'this.on("change", function(model){});' to listen for changes to all attributes of the model.
1 parent 2686006 commit 4d9e33d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_site/what-is-a-model/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ <h2>Listening for changes to the model</h2>
194194
<span class="kd">var</span> <span class="nx">person</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Person</span><span class="p">({</span> <span class="nx">name</span><span class="o">:</span> <span class="s2">&quot;Thomas&quot;</span><span class="p">,</span> <span class="nx">age</span><span class="o">:</span> <span class="mi">67</span><span class="p">});</span>
195195
<span class="nx">person</span><span class="p">.</span><span class="nx">set</span><span class="p">({</span><span class="nx">name</span><span class="o">:</span> <span class="s1">&#39;Stewie Griffin&#39;</span><span class="p">});</span> <span class="c1">// This triggers a change and will alert()</span></code></pre></div>
196196

197-
<p>So we can bind the change listener to individual attributes or if we like simply &#39;<em>this.on(&quot;change&quot;, function(model){});</em>&#39; to listen for changes to all attributes of the model.</p>
197+
<p>So we can bind the change listener to individual attributes, or, if we like, simply &#39;<em>this.on(&quot;change&quot;, function(model){});</em>&#39; to listen for changes to all attributes of the model.</p>
198198

199199
<h2>Interacting with the server</h2>
200200

0 commit comments

Comments
 (0)