Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
concat() 메서드는 매개변수로 전달된 모든 문자열을 호출 문자열에 붙인 새로운 문자열을 반환합니다.
합칠 문자열.
주어진 문자열을 모두 붙인 새로운 문자열.
concat() 함수는 호출 문자열에 문자열 인수를 이어 붙인 결과를 반환합니다. 원본 문자열과 결과 문자열의 변형은 서로에게 영향을 미치지 않습니다. 인수가 문자열이 아니면 계산 전에 문자열로 변환합니다.
아래 예제에서는 문자열을 결합하여 새로운 문자열을 만듭니다.
concat() 메서드보다 할당 연산자 (+, +=)를 사용하는게 더 좋습니다. 성능 테스트 결과에 따르면 할당 연산자의 속도가 몇 배 빠릅니다.
| ECMAScript® 2027 Language Specification # sec-string.prototype.concat |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 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.