Created by Codedamn about a year ago
No description provided
Easiesr way to think about this n++ : return n and then increment
++n : increment n and then return n
let num1 = 10; console.log(num1++); // Output -> 10 -> It is known as Post Increment Operator which first prints out the value then increment/ decrement it. console.log(num1); // Output -> 11 console.log(--num1); // Output -> 10 -> It is known as Pre Decrement Operator which first increment/decrement the value then prints it. console.log(num1); // Output -> 10
Hope so this examples help us out...
Wow the people in the comments are really confusing me
just follow what mehul is teaching. it is simple to understand
i will suggest you to add more Practise labs, by the way enjoying the course.
The course is cool, just need more practice labs
Also if u want to increase or decrease by more than 2 u can use this myAge += 10 //or whatever number u want and the same goes for decreasing myage -= 10
5.15k views till 15-12-22
You are doing greate work mehul