Preview:
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Global Methods</h1>
<h2>The parseFloat() Method</h2>

<p>parseFloat() parses a string and returns the first number:</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
new Number(parseFloat(" 0.00 ")).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})
</script>

</body>
</html>
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter