diff --git a/docs/v1/index.html b/docs/v1/index.html index 3b535fa4..b235889e 100644 --- a/docs/v1/index.html +++ b/docs/v1/index.html @@ -551,25 +551,7 @@ Block
square = (x) -> x * x
cube = (x) -> square(x) * x
-
var cube, square;
-
-square = function(x) {
- return x * x;
-};
-
-cube = function(x) {
- return square(x) * x;
-};
-
Functions may also have default values for arguments, which will be used
if the incoming argument is missing (null
or undefined
).
@@ -603,7 +585,49 @@ kids =
sister:
name: "Ida"
age: 9
-
var bitlist, kids, singers, song;
+
+song = ["do", "re", "mi", "fa", "so"];
+
+singers = {
+ Jagger: "Rock",
+ Elvis: "Roll"
+};
+
+bitlist = [1, 0, 1, 0, 0, 1, 1, 1, 0];
+
+kids = {
+ brother: {
+ name: "Max",
+ age: 11
+ },
+ sister: {
+ name: "Ida",
+ age: 9
+ }
+};
+
In JavaScript, you can't use reserved words, like class
, as properties
of an object, without quoting them as strings. CoffeeScript notices reserved words