calculate the kilometer to miles in javascript

technical talkiess
0

 

calculate the kilometer to miles in javascript

<script>

//get the kilometer

const kilometer = prompt("Enter the Kilo mtere " , 1);


//1 kilometer = 0.621371192 miles 


const miles = 0.621371192;


const kiltomils = kilometer * miles ; 

alert(kiltomils);


</script>




calculate the miles to kilometer


<script>

//get the kilometer

const kilometer = prompt("Enter the Kilo mtere " , 1);


//1 kilometer = 0.621371192 miles 


const miles = 0.621371192;


const milstokilo =  miles / kilometer ; 

alert(milstokilo);





</script>

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)