We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 048e7fa commit ba18e5dCopy full SHA for ba18e5d
lesson_07/conditionals/src/lesson7.ts
@@ -152,13 +152,13 @@ export function addNumbers(values: number[]): number {
152
export function getFirstNFibonacciNumbers(n: number): number[] {
153
const list: number[] = [];
154
const indices = Array.from({ length: n - 1 }, (_, index) => index + 2);
155
- if (n>=1){
+ if (n>=0){
156
list.push(1);
157
}
158
- if (n>=2){
+ if (n>=1){
159
160
161
- if (n>=3){
+ if (n>=2){
162
for (const i of indices) {
163
list[i] = list[i - 1] + list[i - 2];
164
0 commit comments