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

in #stem5 years 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

Sort:  

steemValue++;

Posted using Partiko iOS

toTheMoon++ !giphy rocket

Posted using Partiko Android

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

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.031
BTC 57410.43
ETH 2916.25
USDT 1.00
SBD 3.67