We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55316d0 commit 56231d3Copy full SHA for 56231d3
chapters/arrays/removing-duplicate-elements-from-arrays.md
@@ -12,7 +12,7 @@ You want to remove duplicate elements from an array.
12
{% highlight coffeescript %}
13
Array::unique = ->
14
output = {}
15
- output[@[key]] = @[key] for key in [1...@length]
+ output[@[key]] = @[key] for key in [0...@length]
16
value for key, value of output
17
18
[1,1,2,2,2,3,4,5,6,6,6,"a","a","b","d","b","c"].unique()
0 commit comments