Back to functions

Expression.text


text

Returns the text representation of the expression.

Usage: nerdamer.text(x)


Parameters

String asArray Pass in the string 'decimals' to get back numers as decimals. Pass in the string 'fractions' to get back number as fractions. Defaults to decimals.

EXAMPLES:
var x = nerdamer('1/12+1/2*cos(x)-0.5');
console.log(x.text('decimals'));
console.log(x.text('fractions'));
OUTPUT:
Back to functions