Skip to content

Commit 072cfc4

Browse files
committed
Implement kilograms to pounds conversion
1 parent 8c01268 commit 072cfc4

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// In Sprint-1, there is a program written in 3-mandatory-interpret/3-to-pounds.js
1+
function toPounds(kg) {
2+
return kg * 2.20462;
3+
}
24

3-
// You will need to take this code and turn it into a reusable block of code.
4-
// You will need to declare a function called toPounds with an appropriately named parameter.
5-
6-
// You should call this function a number of times to check it works for different inputs
5+
console.log(toPounds(1));
6+
console.log(toPounds(5));
7+
console.log(toPounds(10));

0 commit comments

Comments
 (0)