Defeating a monster is not the same as crashing into a meteor

avatar

Today I learned about incrementing and decrementing in JavaScript. It was interesting to see how ++ or -- can increase a variable by 1. Also studied plus-equals += and minus-equals -=. They increase the variable by a certain amount. Obviously, if you can write += or -=, you can write *= and /= to multiply or divide the variable by a certain amount. In the book "JavaScript for Kids" Nick Morgan demonstrated with the help of += and -= how our score can change when you defeat a monster or crash into a meteor.

image.png
image.png



0
0
0.000
6 comments
avatar

You know, for someone who does not know anything about JavaScript, this can be like hard ton understand. I am still hoping I can learn coding someday

0
0
0.000