201k views
4 votes
Which of the following is the correct way of multiplying two variables in Liquid?

a. {{ foo bar }}
b. { foo }
c. { foo }
d. { bar }

User Enom
by
7.8k points

1 Answer

6 votes

Final answer:

In Liquid templating language, you multiply two variables using the syntax { times: bar }.

Step-by-step explanation:

The correct way of multiplying two variables in Liquid is { times: bar }. When you need to perform multiplication in Liquid, which is a template language used by Shopify and other platforms, you use the times filter. To use this filter, attach it to the first variable with a pipe character, followed by the keyword times and the second variable as an argument in the syntax shown.

User Douglas Bagnall
by
8.3k points