Compound Assignment With Augmented Addition Fails

Compound Assignment With Augmented Addition Fails
0

#1

Tell us what’s happening:
a should equal 15
b should equal 26
c should equal 19
You should use the += operator for each variable

Your code so far


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

// Only modify code below this line

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

Your browser information:

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

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


#2

9 += b;
You can’t do this. This is trying to change the value of the number 9 to 26.