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

Parentheses missing when invoking Image constructor #12

Closed
tomwanzek opened this issue Feb 2, 2018 · 2 comments
Closed

Parentheses missing when invoking Image constructor #12

tomwanzek opened this issue Feb 2, 2018 · 2 comments

Comments

@tomwanzek
Copy link

image.js line 3 should read:

var image = new Image();
@mbostock
Copy link
Member

mbostock commented Feb 2, 2018

Parentheses are optional with the new operator; they can be omitted if you don’t want to pass any arguments to the constructor, as is the case here.

@mbostock mbostock closed this as completed Feb 2, 2018
@tomwanzek
Copy link
Author

Seems like I'm a hopelessly old-fashioned stylist. Function follows form, I say. 😉

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

No branches or pull requests

2 participants