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

in stem •  10 months ago 

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

steemValue++;

Posted using Partiko iOS

toTheMoon++ !giphy rocket

Posted using Partiko Android


!giphy shuttle+launch

Posted using Partiko iOS


  ·  9 months ago Reveal Comment