Skip to content

Commit 301a8dd

Browse files
committed
Fix Extra semicolon and Block must not be padded by blank lines.
1 parent e0883fa commit 301a8dd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Maths/Factorial.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
'use strict'
1515

1616
const calcRange = (num) => {
17-
return [...Array(num).keys()].map(i => i + 1);
17+
return [...Array(num).keys()].map(i => i + 1)
1818
}
1919

2020
const calcFactorial = (num) => {
2121

2222
if (num > 0) {
2323
const range = calcRange(num)
24-
const factorial = range.reduce((a, c) => a * c, 1);
24+
const factorial = range.reduce((a, c) => a * c, 1)
2525
return `The factorial of ${num} is ${factorial}`
2626
}
2727
if (num === 0) {

Maths/test/Factorial.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { calcFactorial } from '../Factorial'
22

33
describe('calcFactorial', () => {
4-
54
it('should return a statement for value "0"', () => {
65
expect(calcFactorial(0)).toBe('The factorial of 0 is 1.')
76
})

0 commit comments

Comments
 (0)