Use Division Assignment operator (/=) in JavaScript
Description
The following code shows how to use Division Assignment operator (/=).
Example
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var x = 32;<!--from w w w . jav a 2s . com-->
var aString = new String("8");
x /= aString;
document.write("x = ",x);
</script>
</body>
</html>
The code above generates the following result.
Javascript Tutorial Arithmetic
Demonstrate Assignment by Value Versus by R...
Find out the effect of pre and post decreme...
Use Arithmetic Operators (+) to Add string ...
Use Arithmetic Operators (+) to add two num...
Use Arithmetic Operators (+) to add two str...
Use Compound Multiply Operator in JavaScrip...
Use Compound Plus Operator in JavaScript
Use Compound Subtraction Operator in JavaSc...
Use Division (/) operator in JavaScript
Use Division (/) operator with float number...
Use Modulus Assignment operator (%=) in Jav...
Use Modulus (%) operator in JavaScript
Use Multiplication Assignment operator (*=)...
Use Multiplication (*) operator between str...
Use Multiplication (*) operator in JavaScri...
Use Multiply Divide Operator in JavaScript
Use Operator order in parentheses in JavaSc...
Use Postfix operator with another plus oper...
Use Pre-Decrement Operator in JavaScript
Use Pre-Decrement Operator with other opera...
Use Pre-Increment Operator in JavaScript
Use Subtraction (-) Operator between string...
Use Subtraction (-) Operator in JavaScript
Use the Addition Operator to Perform String...
Demonstrate Assignment by Value Versus by R...
Find out the effect of pre and post decreme...
Use Arithmetic Operators (+) to Add string ...
Use Arithmetic Operators (+) to add two num...
Use Arithmetic Operators (+) to add two str...
Use Compound Multiply Operator in JavaScrip...
Use Compound Plus Operator in JavaScript
Use Compound Subtraction Operator in JavaSc...
Use Division Assignment operator (/=) in Ja...
Use Division (/) operator between string an...Use Division (/) operator in JavaScript
Use Division (/) operator with float number...
Use Modulus Assignment operator (%=) in Jav...
Use Modulus (%) operator in JavaScript
Use Multiplication Assignment operator (*=)...
Use Multiplication (*) operator between str...
Use Multiplication (*) operator in JavaScri...
Use Multiply Divide Operator in JavaScript
Use Operator order in parentheses in JavaSc...
Use Postfix operator with another plus oper...
Use Pre-Decrement Operator in JavaScript
Use Pre-Decrement Operator with other opera...
Use Pre-Increment Operator in JavaScript
Use Subtraction (-) Operator between string...
Use Subtraction (-) Operator in JavaScript
Use the Addition Operator to Perform String...