function getInt(stringNum){ return parseInt(stringNum.replace(/,/g , '')); } document.write(getInt('1,000')); // 1000 PS. 그누보드5 경우, no_comma() 함수 기본 제공console.log(no_comma('1,234')); // 1234
function getInt(stringNum){
return parseInt(stringNum.replace(/,/g , ''));
}
document.write(getInt('1,000')); // 1000
PS. 그누보드5 경우, no_comma() 함수 기본 제공console.log(no_comma('1,234')); // 1234
관련글: (230719) https://sir.kr/qa/505960