JSForm
JSForm(expr)
returns the JavaScript form of the
expr
.
JSForm(expr, "Mathcell")
returns the JavaScript form of the
expr
with ‘Mathcell’ flavor output.
JSForm generates JavaScript output for the following JavaScript libraries:
This JavaScript flavour is also used in the [Manipulate](/calculator-usages/symja/functions/manipulate)
function.
See:
Examples
Generate output for JavaScript floating-point arithmetic expressions:
>> JSForm(E^3-Cos(Pi^2/x))(20.085536923187664)-Math.cos((9.869604401089358)/x)
Generate output for MathCell and Math JavaScript libraries:
>> JSForm(4*EllipticE(x)+KleinInvariantJ(t)^3, "Mathcell")add(mul(4,ellipticE(x)),pow(kleinJ(t),3))
With JSForm
you can display the generated JavaScript form of the Manipulate
function
>> Manipulate(Plot(Sin(x)*Cos(1 + a*x), {x, 0, 2*Pi}), {a,0,10}) // JSForm
Related terms
Implementation status
- ✅ - full supported