Open robinmetral opened 5 years ago
The Basic Javascript challenge "Compound Assignment with Augmented Addition" basically asks learners to change: a = a += 12; to: a += 12;
a = a += 12;
a += 12;
However the testing also allows for this solution: a = a += 12 (which is the one I used because it's quicker to simply add an = sign)
a = a += 12
=
Shouldn't it return an error for this? It should be clear that this compound assignment is intended to remove the first = sign and simplify the code.
Note: this also applies to the three subsequent compound assignment challenges
Steps to reproduce the behavior:
a = a += 12; b = b += 9; c = c += 7;
Tests to fail.
Describe the bug
The Basic Javascript challenge "Compound Assignment with Augmented Addition" basically asks learners to change:
a = a += 12;
to:a += 12;
However the testing also allows for this solution:
a = a += 12
(which is the one I used because it's quicker to simply add an=
sign)Shouldn't it return an error for this? It should be clear that this compound assignment is intended to remove the first
=
sign and simplify the code.Note: this also applies to the three subsequent compound assignment challenges
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tests to fail.
Desktop (please complete the following information):