adding a note to the docs about colon/equals equality
This commit is contained in:
parent
3092d74a08
commit
ba7a454f92
|
@ -294,7 +294,8 @@ print reverse 'tpircseeffoc'</textarea>
|
||||||
<b class="header">Assignment</b>
|
<b class="header">Assignment</b>
|
||||||
Use a colon <tt>:</tt> to assign, as in
|
Use a colon <tt>:</tt> to assign, as in
|
||||||
<a href="http://json.org">JSON</a>. Equal signs are only needed for
|
<a href="http://json.org">JSON</a>. Equal signs are only needed for
|
||||||
mathy things.
|
mathy things. While colons are preferred, the two may be used interchangeably,
|
||||||
|
even within object literals.
|
||||||
</p>
|
</p>
|
||||||
<%= code_for('assignment', 'greeting') %>
|
<%= code_for('assignment', 'greeting') %>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -407,7 +407,8 @@ cube = function cube(x) {
|
||||||
<b class="header">Assignment</b>
|
<b class="header">Assignment</b>
|
||||||
Use a colon <tt>:</tt> to assign, as in
|
Use a colon <tt>:</tt> to assign, as in
|
||||||
<a href="http://json.org">JSON</a>. Equal signs are only needed for
|
<a href="http://json.org">JSON</a>. Equal signs are only needed for
|
||||||
mathy things.
|
mathy things. While colons are preferred, the two may be used interchangeably,
|
||||||
|
even within object literals.
|
||||||
</p>
|
</p>
|
||||||
<div class='code'><pre class="idle"><span class="FunctionName">greeting</span><span class="Keyword">:</span> <span class="String"><span class="String">"</span>Hello CoffeeScript<span class="String">"</span></span>
|
<div class='code'><pre class="idle"><span class="FunctionName">greeting</span><span class="Keyword">:</span> <span class="String"><span class="String">"</span>Hello CoffeeScript<span class="String">"</span></span>
|
||||||
<span class="FunctionName">difficulty</span><span class="Keyword">:</span> <span class="Number">0.5</span>
|
<span class="FunctionName">difficulty</span><span class="Keyword">:</span> <span class="Number">0.5</span>
|
||||||
|
|
Loading…
Reference in New Issue