String.prototype.replace()

hameee·2023년 3월 4일
0
var newStr = str.replace(regexp|substr, newSubstr|function)
  • 새로운 문자열 반환
  • regexp(정규식일 경우) -> 해당하는 모든 문자열 치환
    substr(문자열일 경우) -> 첫 번째 문자열만 치환

0개의 댓글