JavaScript program to convert feet to inches

Views: 138   

Following program shows you how to convert feet to inches.
In this program we get feet from user, we get those we need to multiply with 12 so that we get in inches

var feet = parseInt(prompt("Please enter feet:"));
var inches = feet * 12;
console.log(inches + " Inches");

Output:

Please enter feet:
15
180.0 Inches
On By