--- title: 더하기 (+) slug: Web/JavaScript/Reference/Operators/Addition tags: - JavaScript - Language feature - Operator - Reference browser-compat: javascript.operators.addition translation_of: Web/JavaScript/Reference/Operators/Addition ---
더하기 연산자(+
)는 숫자 피연산자의 합을 구하거나, 문자열을 서로 연결합니다.
x + y
// Number + Number -> 덧셈 1 + 2 // 3 // Boolean + Number -> 덧셈 true + 1 // 2 // Boolean + Boolean -> 덧셈 false + false // 0
// String + String -> 연결 'foo' + 'bar' // "foobar" // Number + String -> 연결 5 + 'foo' // "5foo" // String + Boolean -> 연결 'foo' + false // "foofalse"
{{Compat}}