operator precedence js code example
Example 1: operator precedence javascript
a = b = 5; // same as writing a = (b = 5);
Example 2: JavaScript Operator Precedence Values
console.log(3 + 10 * 2); // logs 23
console.log(3 + (10 * 2)); // logs 23 because parentheses here are superfluous
console.log((3 + 10) * 2); // logs 26 because the parentheses change the order