logo image

JavaScript program to convert millimeters into centimeters


Following program shows you how to convert millimeters into centimeters. In this program we get millimeters from user, once we get those we need to divide with 10 so that we get in centimeters

var millimeters = parseInt(prompt("Please enter millimeters:"));
var centimeters = millimeters / 10;
console.log(centimeters + " Centimeters");


Please enter millimeters:
2.5 Centimeters