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

console.log without arguments #36

Open
silverwind opened this issue Oct 30, 2015 · 2 comments
Open

console.log without arguments #36

silverwind opened this issue Oct 30, 2015 · 2 comments

Comments

@silverwind
Copy link

The current method signature in the spec says that the first parameter is required:

console.log(object [, object, ...])

Actual behaviour for console.log() without no parameters varies across implementations:

  • Node.js and Firefox log an empty line
  • Chrome and Safari log nothing

There is some usage of this pattern in Node.js modules, so I'm wondering if a change in the spec like this might be in order to change the signature of log and relatives to:

console.log([object][, object, ...])
@Fishrock123
Copy link

@silverwind wouldn't that just be console.log([object, ...])?

@silverwind
Copy link
Author

@Fishrock123 I'm not sure what's correct for "zero or more parameters". Yours is more concise, so I think I'd prefer it.

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