JS Number Methods Using tostring()

<!DOCTYPE html>

<html>

<body>

<h2>JavaScript List Number of Methods</h2>

<p>The toString() function converts a number to a string.</p>

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

<script>

let x = 125;

document.getElementById("demo").innerHTML =

  x.toString() + "<br>" +

   (125).toString() + "<br>" +

   (100 + 25).toString();

</script>

</body>

</html>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *