loading
Office 01
JL. RAYA SAWANGA, MAMPANG
Pancoran Mas, Depok
+628111026606
Mon - Fri 9:00am - 5:00 pm
[email protected]
24 X 7 online support

How to format numbers in VueJS

How to format numbers in VueJS
How to format numbers in VueJS
How to format numbers in VueJS

If you ever wish to format your numbers in VueJs like adding thousands separators etc. today i will show you simple way to do it without installing any package.

JavaScript has a built-in function for this.

If you're sure the variable is always Number and never a “number String”, you can do:

{{ num.toLocaleString() }}

If you want to be safe, do:

{{ Number(num).toLocaleString() }}

source

Be the first to leave a comment.

Post a Comment

back to top