title: How to convert hours in minutes in javascript HH:MM to MM?
body: <p>I want to convert HH:MM to MM I want to use minutes in below code but It can't convert 14:30 to 858 as you can see result here in <a href="https://jsfiddle.net/arya45/vp76t480/" rel="nofollow noreferrer"><em><strong>fiddle</strong></em></a> minutes but it converts 14.3 to minutes if you put 14.3 in fiddle code instead of 14.30.</p>
  <p>I am converting hrs. in minutes than I am Lessing 240 minutes from minutes I got How can I convert this hrs. in minute.
  below is the code I am trying to convert hours to minutes</p>
  <p><em><strong>NOTE</strong></em>: hours can be can be any Time from 0 to 23 it could be 2:30 or it could be 10:30</p>
  <pre><code>function convertHourstoMinute(hours) {
       return Math.floor(hours * 60);
      }
      let hrs = convertHourstoMinute(14:30); // convert hours into minutes javascript
     console.log( &quot;javascript convert hours to minutes :- &quot; + hrs ); 
  
              let minutes = hrs * 60;
              console.log(minutes)
              let callback_time = minutes - 240
              console.log(callback_time)
              let call_back = callback_time / 60
              console.log(call_back)
  </code></pre>