title: How do I convert string "01" to number in JavaScript?
body: <p>I'd like to know if it is possible to use 2 digits in number in JavaScript if the number is less than 10?</p>
  
  <p>for example</p>
  
  <blockquote>
    <p><strong>10,9,8,7,6</strong> and so on to</p>
    
    <p><strong>10,09,08,07,06</strong> as "number data type"</p>
  </blockquote>
  
  <p>yes, it's possible to display the numbers in 2 digits when the numbers are less than 10 as a "string data type".</p>
  
  <pre><code>if(number &lt; 10) {
      console.log(number) //number
      number = "0" + number;
      console.log(number) //string
  }
  </code></pre>
  
  <p>but I want to use it as number data type so I can use</p>
  
  <pre><code>if(number == 01) {
      //some code here
  }
  </code></pre>
  
  <p>is it possible?</p>