From ba7a454f92a93d50652ff29e2f8753fc48b01cf9 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 15 Feb 2010 13:43:35 -0500 Subject: [PATCH] adding a note to the docs about colon/equals equality --- documentation/index.html.erb | 3 ++- index.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 4bd550da..e481b541 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -294,7 +294,8 @@ print reverse 'tpircseeffoc' Assignment Use a colon : to assign, as in JSON. Equal signs are only needed for - mathy things. + mathy things. While colons are preferred, the two may be used interchangeably, + even within object literals.

<%= code_for('assignment', 'greeting') %>

diff --git a/index.html b/index.html index fcd1eb55..9bb7bf70 100644 --- a/index.html +++ b/index.html @@ -407,7 +407,8 @@ cube = function cube(x) { Assignment Use a colon : to assign, as in JSON. Equal signs are only needed for - mathy things. + mathy things. While colons are preferred, the two may be used interchangeably, + even within object literals.

greeting: "Hello CoffeeScript"
 difficulty: 0.5