Skip to content

Commit f02f5ff

Browse files
committed
Addressed comments for sprint 2
1 parent dfd2491 commit f02f5ff

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Sprint-2/1-key-errors/0.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
// =============> write your new code here
1919
function capitalise(str) {
20-
let newStr = `${str[0].toUpperCase()}${str.slice(1)}`;
21-
return newStr;
20+
return `${str[0].toUpperCase()}${str.slice(1)}`;
2221
}
2322

2423
console.log(capitalise("lowercase"));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
function calculateBMI(weight, height) {
1818
let heightSquared = height * height;
1919
let bmi = weight / heightSquared;
20-
return bmi.toFixed(1);
20+
return parseFloat(bmi.toFixed(1));
2121
}
2222

2323
console.log(calculateBMI(70, 1.73));

0 commit comments

Comments
 (0)