You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let number = 0; //*- This line declares a variable number and initializes it with the value 0.
console.log(number++); //*- This line prints the current value of number and then increments it by 1. The number++ operation is a post-increment operation, which means it returns the value before it was incremented. So, 0 is printed to the console, and number is incremented to 1.
console.log(++number); //* This line increments the value of number by 1 and then prints it. The ++number operation is a pre-increment operation, which means it increments the value before returning it. So, number is incremented to 2, and 2 is printed to the console.
console.log(number); //* - This line simply prints the current value of number, which is 2.