0

How can I use assignment operators in Javascript? I'm really confused

Assignment operators

3rd Sep 2021, 11:26 PM
Jaabir
Jaabir - avatar
2 Respostas
+ 1
Martin Taylor there were some that were like this += -= *= What are these?
4th Sep 2021, 1:19 PM
Jaabir
Jaabir - avatar
+ 1
These are a equivalent to a = a + b a = a - b a = a * b Example: var a = 2; var b = 4; a += b //6 a = a + b //6
5th Sep 2021, 12:54 AM
Anthony Johnson
Anthony Johnson - avatar