what does **2 mean in JS code example
Example 1: ~~ in javascript
~~'-1' = -1
~~true = 1
~~false = 0
~~5.6 = 5
Example 2: what does -= mean in JavaScript
/* JavaScript shorthand -=
-= is shorthand to subtract something from a
variable and store the result as that same variable.
*/
// The standard syntax:
var myVar = 5;
console.log(myVar) // 5
var myVar = myVar - 3;
console.log(myVar) // 2
// The shorthand:
var myVar = 5;
console.log(myVar) // 5
var myVar -= 3;
console.log(myVar) // 2