diff --git a/documentation/coffee/expressions_comprehension.coffee b/documentation/coffee/expressions_comprehension.coffee index c608dd21..2a4d2be2 100644 --- a/documentation/coffee/expressions_comprehension.coffee +++ b/documentation/coffee/expressions_comprehension.coffee @@ -1,3 +1,3 @@ # The first ten global properties. -globals: (name for property, name in window)[0...10] \ No newline at end of file +globals: (name for name ino window)[0...10] \ No newline at end of file diff --git a/documentation/js/expressions_comprehension.js b/documentation/js/expressions_comprehension.js index 3442ff60..262bab7e 100644 --- a/documentation/js/expressions_comprehension.js +++ b/documentation/js/expressions_comprehension.js @@ -1,11 +1,12 @@ (function(){ - var __a, __b, globals, name, property; + var __a, __b, globals, name; // The first ten global properties. globals = ((function() { __b = []; __a = window; - for (name=0; name<__a.length; name++) { - property = __a[name]; - __b.push(name); + for (name in __a) { + if (__a.hasOwnProperty(name)) { + __b.push(name); + } } return __b; })()).slice(0, 10); diff --git a/index.html b/index.html index 7748866d..21d461e7 100644 --- a/index.html +++ b/index.html @@ -927,24 +927,26 @@ six = (one = 1) + (two = 2) + (three = 3);
# The first ten global properties. -globals: (name for property, name in window)[0...10] -
var __a, __b, globals, name, property; +globals: (name for name ino window)[0...10] +
var __a, __b, globals, name; // The first ten global properties. globals = ((function() { __b = []; __a = window; - for (name=0; name<__a.length; name++) { - property = __a[name]; - __b.push(name); + for (name in __a) { + if (__a.hasOwnProperty(name)) { + __b.push(name); + } } return __b; })()).slice(0, 10); -