Created
May 10, 2023 17:01
-
-
Save suhailgupta03/0acefdb0077673729e9272f99e70c16b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 1; | |
console.log(x++); | |
// x++ will increment the number | |
// after it has been printed (any operation) | |
// which means x will only be incremented after the | |
// above statement is executed | |
// value of x after line number 2 is executed is 2 | |
console.log(++x); | |
// ++x will first increment and then | |
// print (or let it be used for operations) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment