Skip to content

Arrays#147

Open
AlexKry96 wants to merge 5 commits into
devmentor-pl:masterfrom
AlexKry96:master
Open

Arrays#147
AlexKry96 wants to merge 5 commits into
devmentor-pl:masterfrom
AlexKry96:master

Conversation

@AlexKry96
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@devmentor-pl devmentor-pl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Olek,

Bardzo dobrze sobie poradziłeś! 👍
Zostawiłem jedną drobną uwagę :)

Comment thread 01/app.js

console.log(users.length)

console.log(users[0], users[2], users[4]) No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread 02/app.js
})

const lastElement = randomArray[randomArray.length - 1];
console.log("last element: ", lastElement); No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread 03/app.js
}
}

console.log(oddNumbers) No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread 04/app.js
})


console.log("Years Passed: ", yearsPassed); No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread 05/app.js

const sum = evenNumbers.reduce(function(acc, curr) {
return acc + curr;
})
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warto pamiętać o dodaniu drugiego parametru tj. }, 0) - wtedy nie będzie błędu jak okaże się, że tablica evenNumbers jest pusta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants