convert hours into minutes in jquery : I want to convert the hours into minutes

example :  hour is 2:18 then i want the output as 138minutes

    <script>
       m = diff % 60;
    h = (diff-m)/60;
    
    mins= h.toString() + ":" + (m<10?"0":"") + m.toString();
     alert(mins)
    </script>