JavaScript Operators Reference

JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. Given that y = 5, the table below explains the arithmetic operators: Operator Description Example Result in y Result in x Try it + Addition x = y […]

JavaScript Assignment

JavaScript Assignment Operators Assignment operators assign values to JavaScript variables. Operator Example Same As = x = y x = y += x += y x = x + y -= x -= y x = x – y *= x *= y x = x * y /= x /= y x = x […]