I have found a bug on JavaScript compound assignment increment with augmented

Why I can’t pass the test even though I’m doing the right thing?

// Only change the code below  this line

a += 15;
b += 26;
c += 19;

Hi @Mikael3211 !
Welcome to the forum!

Please provide the code and challenge link so we can understand what the issue is.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

I’m new in this forum, I’m learning to navigate here,this is my first post. I am having trouble in this test even I’m doing the write code. Thank you for help. If I have any problems I will tell you.

Can you please provide the challenge link?

I don’t know what challenge this is

I see the issue now.

Reset the lesson so you have this original starting code.

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

// Only change code below this line
a = a + 12;
b = 9 + b;
c = c + 7;

You are not supposed to add up the values yourself here
This is incorrect

The challenge wants you use the += operator to add the values to the variables.

Does that make sense?


For example, in this first one here

a = a + 12;

They want you to use the += operator to add 12 to variable a

I’ve passed the test now, Thanks a lot for clarifying this. I appreciate your help you. Thanks xx

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.