Originally Posted by Kiefer
If I use an associative array should it work like this?
I do not have the faintest idea what your question is. But I do not see how associative arrays come into it.
You can use the split() method to divide a number with exponent into its parts-
var string = "-18x12"; // minus 18 raised to the power of 12
var ssplit = string.split("x");
var str = ssplit + "x";
var exponent = ssplit;
var x = str + exponent.sup();