HTML: Markup language
CSS: Styling language
JavaScript: Scripting language
Web APIs: Programming interfaces
All web technology
Learn web development
Discover our tools
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
View in English Always switch to English
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2016년 9월.
join() 메서드는 어떤 형식화 배열의 모든 요소를 하나의 문자열로 연결합니다. 이 메서드는 Array.prototype.join()와 같은 알고리즘을 가지고 있습니다. 형식화 배열(TypedArray)는 형식화 배열의 타입 중 하나입니다.
join()
Array.prototype.join()
const uint8 = new Uint8Array([10, 20, 30, 40, 50]); console.log(uint8.join()); // Expected output: "10,20,30,40,50" console.log(uint8.join("")); // Expected output: "1020304050" console.log(uint8.join("-")); // Expected output: "10-20-30-40-50"
join() join(separator)
separator
배열의 각 요소를 구분할 문자열을 지정합니다. 이 separator는 필요한 경우 문자열로 변환됩니다. 생략하면 배열의 요소들이 쉼표(",")로 구분됩니다.
모든 배열 요소를 연결한 문자열.
const uint8 = new Uint8Array([1, 2, 3]); uint8.join(); // '1,2,3' uint8.join(" / "); // '1 / 2 / 3' uint8.join(""); // '123'
Enable JavaScript to view this browser compatibility table.
TypedArray.prototype.join
core-js
TypedArray