0

I'm a bit of a beginner still and keep coming across this in code:

${Math.round(newProps.percent)}% surrounded by backticks

or

${currentBillingStartDate} surrounded by backticks and not using the percent.

I'd like to understand when it should be used and why.

sbcreates
  • 199
  • 2
  • 11

1 Answers1

0

The percent sign is just a character that is meant to be interpolated with the expression inside the ${variable}. The result would be a string that looks like "55%"

Max
  • 1,517
  • 9
  • 16