Knowledge Walls
John Peter
Pune, Maharashtra, India
How to convert exponential to number and number to exponential in javascript with Example
16220 Views
ToExponential() and toPrecision() 
Number.prototype.toExponential() and Number.prototype.toPrecision() methods used to cast number to exponential and exponential to number accordingly.
Example
var number = 1982.3849;

//Convert number to exponential in javascript toExponential method
document.write(number.toExponential()+"<br />");

var expNumber = 1.9823849e+3;

//Convert exponential value to number
document.write(expNumber+"<br />");
document.write(expNumber.toPrecision()+"<br />");
Demo & Output 
Best Lessons of "One day One Thing to Know"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details