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

Unexpected behaviour when logging out 'undefined' #49

Open
mattgrande opened this issue Aug 4, 2017 · 1 comment
Open

Unexpected behaviour when logging out 'undefined' #49

mattgrande opened this issue Aug 4, 2017 · 1 comment

Comments

@mattgrande
Copy link

Steps to reproduce

  1. Go the the repl
  2. Enter this: const z = [null, undefined]
  3. console.log(z)

Expected result

You should see [null, undefined] in the right-hand side

Actual result

You see [null, null]

Browser: Chrome 59.0.3071.115
OS: OSX 10.12.5 (Sierra)

Kinda strange; I'm mostly just curious if others have seen this issue.

@buzzdecafe
Copy link
Member

yeah that is strange. It appears to be just in the way console.log works. If you just do:

const z = [null, undefined]
z;

the right side of the repl responds with [null, undefined]. Since it evaluates correctly, this doesn't strike me as a crisis, just another hairy js edge.

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

Successfully merging a pull request may close this issue.

2 participants