formating decimal hours as hours and minute javascript

JavaScript
var decimalTimeString = "1.6578";
var n = new Date(0,0);
n.setMinutes(+decimalTimeString * 60);
var result = n.toTimeString().slice(0, 5);
Source

Also in JavaScript: