How to Compound Assignment With Augmented Addition

How to Compound Assignment With Augmented Addition
0

Tell us what’s happening:

Your code so far


var a = 3;
var b = 17;
var c = 12;

// Only modify code below this line

a = a + 12;
b = 9 + b;
c = c + 7;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-addition

What problem are you having? The code you have there has no modification.

“Convert the assignments for a , b , and c to use the += operator.”

i don’t understand that why

Like stated in the challenge having myVar = myVar + 5; is the same as having myVar += 5, you just have to change a, b and c to +=

please show me the solution

Check a previous reply to the same question in this post