var x = 5; // x = 5
x *= 2; // multiply x with 2 (x = 10)
console.log(++x); // console.log x plus 1 (11)
A more common way of using this syntax is with plus or minus:
x += 1;
// is a shorthand for
x = x + 1;
x *= 2;
// is a shorthand for
x = x * 2;
// etc.
solved How do you calculate this [duplicate]