Skip to main content
Known Participant
April 12, 2023
Question

Adding text to number counter

  • April 12, 2023
  • 1 reply
  • 398 views

Hi 

I'm using the below expression for a number counter

 

 

var num = parseFloat(effect("Angle Control")("Angle"));
num.toLocaleString('en-GB', {maximumFractionDigits:0}) + "%";

 

 

I'd like to add the text (%) before the number rather than after if possible?

Thanks

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
April 12, 2023

This should work:

var num = effect("Angle Control")("Angle").value;
"%" + num.toLocaleString('en-GB', {maximumFractionDigits:0})
shmithsAuthor
Known Participant
April 12, 2023

Perfect, thanks!