Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

KateSolodchuk
Copy link
Contributor

@KateSolodchuk KateSolodchuk commented Oct 7, 2024

@keksobot keksobot changed the title делает домашнее задание Больше деталей Oct 7, 2024
keksobot pushed a commit that referenced this pull request Oct 7, 2024
@keksobot
Copy link
Contributor

keksobot commented Oct 7, 2024

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

@@ -235,5 +235,6 @@ <h2 class="data-error__title">Не удалось загрузить данны
</template>

<script src="/js/functions.js"></script>
<script src="/js/main.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

./js/main.js

};
};

const createPhoto = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

возвращай сразу объект

Copy link
Collaborator

Choose a reason for hiding this comment

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

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

его используй вместо id

Copy link
Collaborator

Choose a reason for hiding this comment

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

(_, index)

и этот index

};
};

const photoList = Array.from({length: PHOTO_LIST_LENGTH}, createPhoto());
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут колбек, скобки кажется лишние у createPhoto
и без них должно сработать, попробуй

};
};

const createComment = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

@keksobot keksobot merged commit d92e5cd into htmlacademy-javascript:master Oct 7, 2024
1 check failed
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