Highlighted brick wall with neon inscription assignment

Assignment Operators

In JavaScript, there are some additional assignment operators that we can use in addition to the normal equal sign. There are several, but the most common are addition/subtraction assignment operators. Here is an example…

The output of startYear would be 2021. We could do the same thing with -=.

Happy Coding!

Clay Hess

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Skip to content