Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dannyid
Last active November 28, 2016 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannyid/0f45e8e3b22b2e64590d554f952e5e9f to your computer and use it in GitHub Desktop.
Save dannyid/0f45e8e3b22b2e64590d554f952e5e9f to your computer and use it in GitHub Desktop.
Javascript puzzle.
// Given:
var i = '1';
// 1. What is the value of the below expression?
// 2. What is the value of `i` afterwards?
++i + +i+++i+i +++i+i+i+++i++ +i+++i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment