Forum Discussion
Javascript Math.pow
As said... now you can see the full glory of all decimals... but the lower field is a textString, so make sure when doing calculations with it to convert it back to a Number.
https://360.articulate.com/review/content/d714fde1-7952-4530-8993-afc2c23e1b55/review
Code now is like this:// connect with Storyline Playerlet player = GetPlayer();//Get the variables NetFig and NetPowerlet nFig = player.GetVar("NetFig");let nPow = player.GetVar("NetPower");// Do the calculation and set a variable to itlet endRst = Math.pow(nFig, nPow);//convert this to a stringlet tmpString = endRst.toString();// And set a Storyline String as endResult so you get more then 2 decimalsplayer.SetVar("EndResultStr",tmpString);// Set the Storyline variable to it, so it shows in Storylineplayer.SetVar("EndResult",endRst);