From a11b71ee545413adfd9ca2d9fc5807b3f209c9c6 Mon Sep 17 00:00:00 2001 From: LSvekis Date: Thu, 27 May 2021 16:00:56 -0400 Subject: [PATCH] Create chapter 2 --- chapter 2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 chapter 2 diff --git a/chapter 2 b/chapter 2 new file mode 100644 index 0000000..d419f76 --- /dev/null +++ b/chapter 2 @@ -0,0 +1,14 @@ +let myDistanceKM = 130; +let myDistanceMiles = myDistanceKM * 1.60934; +console.log('The distance of ' + myDistanceKM + ' kms is equal to ' + myDistanceMiles + ' miles') + +//1 inch = 2.54 centimeters. +//2.2046 pounds in a kilo +let inches = 72; +let pounds = 180; +let weight = pounds / 2.2046; // in kilos +let height = inches * 2.54; // height in centemeters +console.log(inches,pounds); +console.log(weight, height); +let bmi = weight/(height/100*height/100); +console.log(bmi);