Path: blob/main/files/en-us/web/javascript/reference/operators/assignment/index.md
6520 views
------{{jsSidebar("Operators")}}
The assignment (=) operator is used to assign a value to a variable. The assignment operation evaluates to the assigned value. Chaining the assignment operator is possible in order to assign a single value to multiple variables.
{{EmbedInteractiveExample("pages/js/expressions-assignment.html")}}
Syntax
Examples
Simple assignment and chaining
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}