Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
加算代入 (+=) 演算子は、 2 つのオペランドの加算(数値の加算または文字列の結合のどちらか)を実行し、左オペランドへ結果を代入します。
x += y は x = x + y と同等ですが、式 x は一度しか評価されません。
それ以外の文字列でも長整数でもない値は、数値に変換されます。
| ECMAScript® 2027 Language Specification # sec-assignment-operators |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年8月30日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.