For example, I want to convert context variable value as below given:
123e-3 --> 0.123
2.918290764E7 --> 29182907.64
5.9724e+24 --> 5972400000000000000000000
Can you show me the actual code that is producing those results? The various options I've tried, don't produce the results you're describing.
For example, in my tests, this code
var x = 0.123;
print('x= ' + x);
var y = Number(x).toFixed(2);
print('y= ' + y);
var z = 29182907.64;
print('z= ' + z);
produces this output:
x= 0.123
y= 0.12
z= 29182907.64
If you could show me the code that you are using that gets results you don't like, that would help.
Also, What are you trying to do within the JS callout? What is the real problem you're solving for?