Skip to content

Больше деталей#4

Open
olllga2411 wants to merge 13 commits into
htmlacademy-javascript:masterfrom
olllga2411:module4-task1
Open

Больше деталей#4
olllga2411 wants to merge 13 commits into
htmlacademy-javascript:masterfrom
olllga2411:module4-task1

Conversation

@olllga2411

@olllga2411 olllga2411 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

@keksobot keksobot changed the title Module4 task1 Больше деталей Jun 6, 2026
keksobot pushed a commit that referenced this pull request Jun 6, 2026
@keksobot

keksobot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

1 similar comment
@keksobot

keksobot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

keksobot pushed a commit that referenced this pull request Jun 9, 2026
Comment thread js/main.js Outdated
@@ -0,0 +1,94 @@
const description = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

константы-данные стоит записывать DESCRIPTIOM, NAME_USER и тд

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

а также если это "описания" - то DESCRIPTIONS

Comment thread js/main.js Outdated
'моя любовь',
];

const nameUser = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NAMES или NAME_LIEST

Comment thread js/main.js Outdated
'Олег',
];

const messegeUser = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

USER_MESSAGES | USER_MESSAGE_LIST

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

мы названием переменной должны явно показать что это список например

Comment thread js/main.js Outdated
comments: similarComments
});

const similarFotos = Array.from ({length: quantityFotos} , createComments);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ожидаю что это будет функция, что бы можно было вызвать повторно

также название надо поменять чтоб было понятно что вернет список тумб/фоток

keksobot pushed a commit that referenced this pull request Jun 28, 2026
@keksobot

Copy link
Copy Markdown
Contributor

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

Comment thread js/main.js
const avatarNumber = getRandomInteger(1, 6);
const quantityMessege = getRandomInteger(1, 2);
const quantityComments = getRandomInteger(0, 30);
const quantityFotos = 25;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

тк константа, будет запись QUANTITY_FOTOS

Comment thread js/main.js
const similarComments = Array.from ({length: quantityComments} , createComments);

const createFotos = () => ({
id : generatePhotoId(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ты можешь id передавать атриюутом функциюю, тк у тебя генерация идет через Array.from

второй аргумент это индекс

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

и выйдет что в id подставишь id: index + 1

url также через индекс

и будут вероятней всего лишние функции

Comment thread js/main.js

function totalMessage (quantityMessege) {
const textMessege = new Set([USER_MESSAGE_LIST[getRandomInteger(0, USER_MESSAGE_LIST.length - 1)]]);
if (quantityMessege === 2) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

можно без проверки, просто в while смотреть на текущий размер сета и сразу сверять с тем какая длина нужна

и тогда не будет "магической двойки" и лишнего ифа

@keksobot

Copy link
Copy Markdown
Contributor

Не удалось смёржить пулреквест. Проверьте наличие конфликтов. Задание переведено в статус Есть замечания

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.

3 participants