Skip to content

Commit 3a4cd9c

Browse files
committed
formatting using prettier
1 parent f46495a commit 3a4cd9c

File tree

1 file changed

+6
-4
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1111
// =============> the function multiply has no return statement
1212

1313
// Finally, correct the code to fix the problem
14-
// =============>
14+
// =============>
1515
function multiply(a, b) {
16-
return (a * b); // we change the console.log statement with the return statement
16+
return a * b; // we change the console.log statement with the return statement
1717
}
1818

1919
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
2020

21-
// an extra notice: the purpose of creating a function is to reuse it when needed
21+
// an extra notice: the purpose of creating a function is to reuse it when needed
2222
// I've noticed that the parameters are already assigned to values 10 and 32, so I changed the code to the following:
2323
function multiply(a, b) {
24-
return console.log(`The result of multiplying ` + a +` and ` + b +` is ` + (a * b));
24+
return console.log(
25+
`The result of multiplying ` + a + ` and ` + b + ` is ` + a * b
26+
);
2527
}
2628
multiply(10, 32);

0 commit comments

Comments
 (0)