Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Convert 'is' to Number in JavaScript



Use the Number() method in JavaScript to convert to Number. You can try to run the following code to learn how to convert ["demo"] to Number in JavaScript −

Example

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <p>Convert ["demo"] to Number</p>
      <script>
         var myVal = ["demo"];
         document.write("Number: " + Number(myVal));
      </script>
   </body>
</html>
Updated on: 2020-06-23T09:58:50+05:30

93 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements