Convert string to create an integer or real value with parseFloat(str) in JavaScript
Description
The following code shows how to convert string to create an integer or real value with parseFloat(str).
Example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.writeln(parseFloat("12.34.5"));
</script><!-- w w w .ja v a 2 s. c o m-->
</head>
<body>
</body>
</html>
The code above generates the following result.