JavaScript에서 join() 실행
مาดูตัวอย่างกาน
const data = [11,22,33,44];
console.log(data.join());
ㅁㅁㅁ
11,22,33,44
จะสัง เกตุว่าไม่มีการแสดงเครื่องหมาย [] ปรากฏอยู่
","ไปเป็นอย่าองื่น เช่น "*"
شامیر ถ เขียน 코드 ได้ เป็น
const data = [11,22,33,44];
console.log(data.join("*"));
ㅁㅁㅁ
11*22*33*44
정보 제공
const data = [11,22,33,44];
console.log(data.join("-"));
ㅁㅁㅁ
11-22-33-44
مาดูตัวอย่างอื่น ๆ
let sumNum = (...numArr) => {
let total = 0
total = numArr.map((num) => total += num)
return total
}
console.log(sumNum(10,10).join())
룰렛
10,20
Reference
이 문제에 관하여(JavaScript에서 join() 실행), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/supaluckn/kaaraich-join-ain-javascript-3kia텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)