0
문자열로 여러 번 나타나는 Bs와 마찬가지로 바꾸고 싶습니다.자바 스크립트에서 단어 바꾸기
function temp(a,b) {
console.log('The first is ' + b + ' and the second is ' + a + ' and by the way the first one is ' + b);
}
temp('a','b')
eval(temp.toString().replace('first','second'));
eval(temp.toString().replace('second','first'));
temp('a','b');
이 작동하지 않습니다하지만 다음과 같은 결과를 얻을 싶습니다 : 당신이 그것을 문자열을 주면
The first is a and the second is b and by the way the first one is a
왜 안'온도 ('B', 'A')? ' –