Last Updated : 23 Jul, 2025
JavaScript Division Assignment Operator in JavaScript is represented by "/=". This operator is used to divide the value of the variable by the value of the right operand and that result is going to be assigned to the variable. This can also be explained as dividing the value of the variable by an expression and assigning that result to the variable.
Syntax:
a /= b or a = a / b
Example 1: In this example, we will use the division assignment operator.
JavaScript
let x = 18;
x /= 3;
console.log(x);
x /= 2;
console.log(x);
x /= 0;
console.log(x);
Example 2: In this example, we will use the division assignment operator.
JavaScript
let a = 18;
a /= 3;
console.log(a);
a /= 'bar';
console.log(a);
We have a complete list of Javascript Assignment Operators, Please check this article Javascript Assignment Operator.
Supported Browser:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4