Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mistake in example code? #26

Open
dannyko opened this issue Mar 4, 2013 · 1 comment
Open

mistake in example code? #26

dannyko opened this issue Mar 4, 2013 · 1 comment

Comments

@dannyko
Copy link

dannyko commented Mar 4, 2013

Hi,

In the "addToSet" and "removeFromSet" pasted below that appear after Exercise 14, shouldn't the double dots ".." be triple dots "..." in order to avoid requesting an element that does not exist?

addToSet = (set, values) ->
for i in [0..values.length]
set[values[i]] = true

removeFromSet = (set, values) ->
for i in [0..values.length]
delete set[values[i]]

@michaelficarra
Copy link

It appears so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants