diff --git a/documentation/index.html.erb b/documentation/index.html.erb index 55fca024..5d3128fb 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -43,7 +43,7 @@ Assignment Objects and Arrays Lexical Scoping and Variable Safety - Conditionals, Ternaries, and Conditional Assignment + If, Else, Unless, and Conditional Assignment Aliases Splats... While, Until, and Loop @@ -434,15 +434,17 @@ coffee --print app/scripts/*.coffee > concatenation.js

- Conditionals, Ternaries, and Conditional Assignment + If, Else, Unless, and Conditional Assignment If/else statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. There's also a handy postfix form, with the if or unless at the end.

- CoffeeScript will compile if statements using the ternary operator - when possible, to make it easier to use the result as an expression. + CoffeeScript can compile if statements into JavaScript expressions, + using the ternary operator when possible, and closure wrapping otherwise. There + is no explicit ternary statement in CoffeeScript — you simply use + a regular if statement inline.

<%= code_for('conditionals') %>

diff --git a/index.html b/index.html index 44304c72..ae5e02d8 100644 --- a/index.html +++ b/index.html @@ -29,7 +29,7 @@ Assignment Objects and Arrays Lexical Scoping and Variable Safety - Conditionals, Ternaries, and Conditional Assignment + If, Else, Unless, and Conditional Assignment Aliases Splats... While, Until, and Loop @@ -599,15 +599,17 @@ inner = changeNumbers();

- Conditionals, Ternaries, and Conditional Assignment + If, Else, Unless, and Conditional Assignment If/else statements can be written without the use of parentheses and curly brackets. As with functions and other block expressions, multi-line conditionals are delimited by indentation. There's also a handy postfix form, with the if or unless at the end.

- CoffeeScript will compile if statements using the ternary operator - when possible, to make it easier to use the result as an expression. + CoffeeScript can compile if statements into JavaScript expressions, + using the ternary operator when possible, and closure wrapping otherwise. There + is no explicit ternary statement in CoffeeScript — you simply use + a regular if statement inline.

mood: greatlyImproved if singing