Plus operator
In javascript, plus operator can be used for multiple purposes.
In previous session we have already done sum function, where + operator is used to add numbers. But it can be also used for concatenate two or more strings together.
For example,
let firstName = "Jack";
let lastName = "Steve";
console.log(firstName + " " + lastName); // Jack Steve
+= operator
let sum = 10;
sum = sum + 10;
console.log(sum); // 20
The above example can be rewrited by using += operator.
let sum = 10;
sum += 10;
console.log(sum); // 20