Operators have different priorities. Higher precedence runs first:
console.log(2 + 3 * 4) // 14 (not 20)
// * runs before +
console.log(10 - 4 - 2) // 4
// Same precedence: left to right
Math precedence follows the rules you learned in school: multiplication and division before addition and subtraction. When in doubt, use parentheses to make your intention clear.