Initial value of var1 = 45 and X = 45

Lets apply the following fourmula X = var1++ [ i.e. Post increment of a variable ]

After post-increment value of var1 = 46 and X = 45

Initial value of var1 = 45 and X = 45

Lets apply the following fourmula X =++var1 [ i.e. Pre increment of a variable ]

After pre-increment value of var1 = 46 and X = 46

Initial value of var1 = 45 and X = 0

Lets apply the following fourmula X = var1-- [ i.e. Post decrement of a variable ]

After post-decrement value of var1 = 44 and X = 45

Initial value of var1 = 45 and X = 0

Lets apply the following fourmula X = --var1 [ i.e. Pre decrement of a variable ]

After pre-decrement value of var1 = 44 and X = 44

Edit in JS Bin