Knowledge Walls
John Peter
Pune, Maharashtra, India
How to convert exponential to number and number to exponential in javascript with Example
ToExponential() and toPrecision() 
Number.prototype.toExponential() and Number.prototype.toPrecision() methods used to cast number to exponential and exponential to number accordingly.
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 
Previous Topics
Previous lessons of current book.
Computer software engineer articles of One day One Thing to Know
Best Lessons of "One day One Thing to Know"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details