inches to mm code example
Example 1: cm to inches
const cm = 1;
console.log(`cm:${cm} = in:${cmToIn(cm)}`);
function cmToIn(cm){
var in = cm/2.54;
return in;
}
Example 2: mm to m
1 meter (m) = 1000 millimeter (mm)
const cm = 1;
console.log(`cm:${cm} = in:${cmToIn(cm)}`);
function cmToIn(cm){
var in = cm/2.54;
return in;
}
1 meter (m) = 1000 millimeter (mm)