.replace()는 바꾸고자 하는 문자열을 지정해 다른 문자열로 바꾸는 메서드 입니다.
string.replace( string1 , string2 )
간단한 예제는 아래와 같습니다.
결과
출처 : 코딩팩토리