Convert string with initial zeros to float with parseFloat() in JavaScript
Description
The following code shows how to convert string with initial zeros to float with parseFloat().
Example
<!--from ww w . j av a 2 s. c om-->
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
document.writeln(parseFloat("012.34.5"));
</script>
</head>
<body>
</body>
</html>
The code above generates the following result.