mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
adding a note to the docs about colon/equals equality
This commit is contained in:
parent
3092d74a08
commit
ba7a454f92
2 changed files with 4 additions and 2 deletions
|
@ -294,7 +294,8 @@ print reverse 'tpircseeffoc'</textarea>
|
|||
<b class="header">Assignment</b>
|
||||
Use a colon <tt>:</tt> to assign, as in
|
||||
<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>
|
||||
<%= code_for('assignment', 'greeting') %>
|
||||
<p>
|
||||
|
|
|
@ -407,7 +407,8 @@ cube = function cube(x) {
|
|||
<b class="header">Assignment</b>
|
||||
Use a colon <tt>:</tt> to assign, as in
|
||||
<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>
|
||||
<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>
|
||||
|
|
Loading…
Add table
Reference in a new issue