반응형


마법의 정규식 !!! 


function numberWithCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}


끄읏 ~ 



반응형

+ Recent posts