An object or array containing variables which will be filled in in the template.
options
number | Object
Formatting options, or the number of digits to format numbers. See function math.format for a description of all options.
Returns
Type
Description
string
Interpolated string
Throws
Type
Description
Examples
// the following outputs: 'Lucy is 5 years old'
math.print('Lucy is $age years old',{age:5})// the following outputs: 'The value of pi is 3.141592654'
math.print('The value of pi is $pi',{pi:math.pi},10)// the following outputs: 'hello Mary! The date is 2013-03-23'
math.print('Hello $user.name! The date is $date',{user:{name:'Mary',},date:newDate(2013,2,23).toISOString().substring(0,10)})// the following outputs: 'My favorite fruits are apples and bananas !'
math.print('My favorite fruits are $0 and $1 !',['apples','bananas'])