What Does => Mean Javascript Code Example


Example: 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

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable