Skip to content

Tasks completed#148

Open
ArturDevCraft wants to merge 5 commits intodevmentor-pl:masterfrom
ArturDevCraft:master
Open

Tasks completed#148
ArturDevCraft wants to merge 5 commits intodevmentor-pl:masterfrom
ArturDevCraft:master

Conversation

@ArturDevCraft
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.

Arturze,

Zadanka są ok 👍
Zwróciłem Ci parę uwag na szczegóły ;)

Comment thread 01/app.js
'Olga Zarzeczna',
];

console.log(users[0], users[2], users[4], users.length);
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 randomArray = createRandomArray();
console.log(randomArray);

for (let i = 0; i <= randomArray.length - 1; i++) {
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.

Chyba łatwiej jest też zapisać bez = oraz -1 - mniej pisania, tj. for (let i = 0; i < randomArray.length; i++) {

Comment thread 03/app.js
oddNumbers.push(i);
}

console.log(oddNumbers);
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
const years = [1980, 1934, 2002, 2019]; No newline at end of file
const years = [1980, 1934, 2002, 2019];
const currentYear = new Date().getFullYear();
const howLong = years.map((year) => currentYear - year);
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 = numbers
.filter((num) => num % 2 === 0)
.reduce((prev, curr) => curr + prev);
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 na końcu dać 2 parametr tj. , 0 - wtedy nie będzie błędu jak tablica będzie 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