Use math operator with Param Values?

Can Hugo use param-declared values in math operators?

I have some values set as params like so…

rrpprice = "200"
saleprice = "160"

Can I use the math ‘sub’ operator to calculate the difference between the prices?

{{ sub .Params.rrpprice .Params.saleprice }}

This is something you can test out on your own. Can you use that? Please try it and report back. :slight_smile:

As far as I understand, quotes turn digits into a string, probably for math it’s more logical to write without quotes.

saleprice = 160