Javascript Number Type Question 5

Introduction

What is the output of the following code?

let b = 3.1415927;
console.log( b.toExponential(2)); // 
console.log( b.toExponential(5) ); // 
console.log( b.toExponential(0) ); // 


3.14e+0
3.14159e+0
3e+0



PreviousNext

Related