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

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.26
TRX 0.11
JST 0.032
BTC 63510.75
ETH 3065.54
USDT 1.00
SBD 3.82