v1.9.1
Divides a number by another number. The result is the string obtained by JavaScript .toString() of the result number.
Input
{{ 16 | divided_by: 4 }} |
Output
4 |
Input
{{ 5 | divided_by: 3 }} |
Output
1.6666666666666667 |
Integer ArithmeticSince JavaScript doesn’t differentiate integers and floats, LiquidJS is not capable of integer arithmetic and the return type is always
number, the string representation of which depends on its value.