+ 2

Why *= assignment oprator is not working???

https://code.sololearn.com/W9At9As8aCo6/?ref=app

5th Jun 2020, 6:36 PM
Himanshu Rai
Himanshu Rai - avatar
4 Answers
+ 1
Because you used var keyword with it. You shouldn't use var keyword for variables which were already defined.
5th Jun 2020, 6:57 PM
Seb TheS
Seb TheS - avatar
+ 3
In the second line, don't put 'var' again...
5th Jun 2020, 6:56 PM
Namit Jain
Namit Jain - avatar
+ 2
Don't declare x as a var twice: var x = 5; x *= 5; console.log(x) //25
5th Jun 2020, 6:57 PM
Russ
Russ - avatar
+ 2
Thank u all for clarifying it.â˜ș
5th Jun 2020, 7:01 PM
Himanshu Rai
Himanshu Rai - avatar