Compound Assignment With Augmented Multiplication please help stuck on this assignment operation

Compound Assignment With Augmented Multiplication please help stuck on this assignment operation
0.0 0

#1

Tell us what’s happening:

Your code so far


var a = 5;
var b = 12;
var c = 4.6;

// Only modify code below this line

a = a * 5;
b = 3 * b;
c = c * 10;
a *= 5;
b *= 3;
c *= 10;

Your browser information:

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

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


#2

Actually got made it correct dear, you just forgot to comment out the non-Compound default statement.

comment out the default non-Compound statements, and it’s okay.


#3

how its gonna done can u explain it with some example?


#4

You made it right dear, let’s see the case study first it needs followings

a should equal 25
b should equal 36
c should equal 46
You should use the *= operator for each variable
Do not modify the code above the line

the default(init) values are as followings

var a = 5;
var b = 12;
var c = 4.6;

the default non-compound statements are as following

a = a * 5;
b = 3 * b;
c = c * 10;

You need to change the above and make them as compound based statements which you already did, but you forgot to remove or commend non-compound ones(above lines)

So the result fails. Simply commend or remove the default operations.

final:

var a = 5;
var b = 12;
var c = 4.6;

// Only modify code below this line
// a = a * 5;
// b = 3 * b;
// c = c * 10;
a *= 5;
b *= 3;
c *= 10;

And we are awesome.


#5

thank you for ur answer but my output is not showing on the result box and it is showing only the message “running test”.What should I do it is not going forward?


#6

and also not approving my input and saying that code run successful as showed earlier.


#7

Well I’m not familiar with learning division. But I believe not all script you do should print or do something visual, no.

Just like this case-study. The assignment wanted you to work and understand the compound assignment operators which you did it very well.

I tried the final code I provided and it accepted the input with all requirements for the case-study done, and ready for next lessons.

You may also use console.log() and check browser log to see changed values.


#8

:slightly_smiling_face::smiley::smiley::smiley: