JavaScript program to convert days to hours

Views: 251   

Following program shows you how to convert days to hours.
In this program we get days from user, once we get those we need to multiply with 24 so that we get in hours

var days = parseInt(prompt("Please enter days:"));
var hours = days * 24;
console.log(hours + " Hours");


Please enter days:
480 Hours
On By