0

I have a string of value

1.02947826525E9 

and it has exponential component. I want to convert this string to corresponding numeric value.

Is there a direct way to convert this string to numeric value?

0

2 Answers 2

3

Use the built-in parseFloat.

parseFloat('1.02947826525E9')
Sign up to request clarification or add additional context in comments.

Comments

2

Using parseFloat():

console.log(parseFloat('1.02947826525E9'))

USING Number()

console.log(Number('1.02947826525E9'));

USING Explicit type conversion

console.log('1.02947826525E9' * 1);

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.