JS_텍스트 수정

dev.dave·2023년 7월 25일

Javascript

목록 보기
50/167

// const word = "hqllo my name is hyqwon";

// function replaceAll(string, searchString, replaceString) {
// const result = string.split(searchString).join(replaceString);
// return console.log(result);
// }

// replaceAll(word, "q", "e");

const word = "hqllo my name is hyqwon";
const wordArr = [...word];
console.log(wordArr);

function replaceAll(string, searchString, replaceString) {
const result = string.split(searchString).join(replaceString);
return console.log(result);
}

replaceAll(word, "q", "e");

profile
🔥개인 메모 / 다른블로그 자료 참조 / 다른블로그 자료 퍼옴 (출처표기) /여기저기서 공부 했던 내용 개인메모 & 참고 / 개인 기록 용도 블로그 입니다.🔥

0개의 댓글