Skip to content

Conversation

@AlenaBeloglazova
Copy link
Contributor

@AlenaBeloglazova AlenaBeloglazova commented Jan 3, 2026

@keksobot keksobot changed the title разделяет main.js на модули Модуляция Jan 3, 2026
js/data.js Outdated
import {getUniqueId} from './util.js';
import {getRandomInteger} from './util.js';

const MESSAGE = ['Всё отлично!', 'В целом всё неплохо. Но не всё.', 'Когда вы делаете фотографию, хорошо бы убирать палец из кадра. В конце концов это просто непрофессионально.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Тк это массив то назвать нужно MESSAGES - во множественном числе

Copy link
Collaborator

Choose a reason for hiding this comment

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

И давай вынесем эту и константы ниже в отдельный файл const.js - в нем будем хранить подобные константы проекта.

Comment on lines +21 to +22
export {getRandomInteger};
export{getUniqueId};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Экспортировать можно один раз
export {getRandomInteger, getUniqueId};

@summertime-fms summertime-fms merged commit b2cb8b0 into htmlacademy-javascript:master Jan 13, 2026
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.

2 participants