Skip to content

Commit 4e87db6

Browse files
committed
formatting using prettier
1 parent 614b5fc commit 4e87db6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sprint-2/2-mandatory-debug/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const num = 103;
1111
function getLastDigit() {
1212
return num.toString().slice(-1);
1313
}
14-
//
14+
1515
console.log(`The last digit of 42 is ${getLastDigit(42)}`);
1616
console.log(`The last digit of 105 is ${getLastDigit(105)}`);
1717
console.log(`The last digit of 806 is ${getLastDigit(806)}`);

Sprint-2/3-mandatory-implement/1-bmi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// The BMI calculation divides an adult's weight in kilograms (kg) by their height in metres (m) squared.
44

55
// For example, if you weigh 70kg (around 11 stone) and are 1.73m (around 5 feet 8 inches) tall, you work out your BMI by:
6-
6+
//
77
// squaring your height: 1.73 x 1.73 = 2.99
88
// dividing 70 by 2.99 = 23.41
99
// Your result will be displayed to 1 decimal place, for example 23.4.
@@ -15,6 +15,6 @@
1515
// It should return their Body Mass Index to 1 decimal place
1616

1717
function calculateBMI(weight, height) {
18-
return BMI = (weight / (height * height)).toFixed(1); // return the BMI of someone based off their weight and height
18+
return (BMI = (weight / (height * height)).toFixed(1)); // return the BMI of someone based off their weight and height
1919
}
2020
console.log(calculateBMI(90, 1.77)); // when calling this function with given someone's weight and height

0 commit comments

Comments
 (0)