Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

add comma for input number automatically typescript

addCommas(x) {
    var parts = x.toString().split(".");
    parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ",");
    return parts.join(".");
}
 
PREVIOUS NEXT
Tagged: #add #comma #input #number #automatically #typescript
ADD COMMENT
Topic
Name
1+2 =