To use the value of a variable in a hint or feedback message, use the following syntax in the hint message:
<%=variableName%>
For example, to reference widget variables in a hint message:
What is the smallest number that both <%=givenDenom1%> and <%=givenDenom2%> go into?
You can use this same syntax to insert the result of a formula in a
hint or feedback message. The following example uses the
sum function to find the sum of two numbers, and
prints the result:
The sum of the two numbers is <%=sum(givenDenom1,givenDenom2)%>.