Code wrong? Compound Assignment With Augmented Subtraction

Tell us what’s happening:

Hi

I think my code is correct but it says I am wrong. Am I missing something?

Your code so far


var a = 11;
var b = 9;
var c = 3;

// Only modify code below this line

a -= 5;
b -= -6;
c -= 2;


Well, this is the initial code:

var a = 11;
var b = 9;
var c = 3;

// Only modify code below this line

a = a - 6;
b = b - 15;
c = c - 1;

When the tests say

b should equal -6

that is because 9 minus 15 is equal -6, but you are doing 9 - (-6), so the result is not that one.

You still need to substract 15 from b, not change the numbers


If you need something to visualize the operations, try using the tool linked below, start with the provided code, see what it does, and then modify it using the operator and make sure the results are still the same
http://pythontutor.com/javascript.html

Thank you.

Ok that makes sense. I now get that I was thinking I needed to do something more than just change how the code is written. I also get what you are saying about seeing the code in action. When I did that I could then see what does a actually equal, and it returned an answer. So silly, but I took for granted that the code ACTUALLY does interact and is not just code on a document.