mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Upgrade dependencies and fix ESLint issues.
This commit is contained in:
@@ -9,7 +9,7 @@ export default function pascalTriangle(lineNumber) {
|
||||
|
||||
for (let numIndex = 1; numIndex < currentLineSize; numIndex += 1) {
|
||||
// See explanation of this formula in README.
|
||||
currentLine[numIndex] = currentLine[numIndex - 1] * (lineNumber - numIndex + 1) / numIndex;
|
||||
currentLine[numIndex] = (currentLine[numIndex - 1] * (lineNumber - numIndex + 1)) / numIndex;
|
||||
}
|
||||
|
||||
return currentLine;
|
||||
|
||||
Reference in New Issue
Block a user