加法赋值 (+=)
加法赋值 (+=
) 运算符对两个操作数执行 addition(数字加法或字符串连接),并将结果赋给左侧操作数。
¥The addition assignment (+=
) operator performs addition (which is either numeric addition or string concatenation) on the two operands and assigns the result to the left operand.
Try it
语法
描述
示例
使用数字进行加法赋值
使用 BigInts 进行加法赋值
使用字符串进行加法赋值
规范
Specification |
---|
ECMAScript Language Specification # sec-assignment-operators |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also