Skip to content

Update script.js#1

Open
KateDanKo wants to merge 2 commits intomainfrom
hometask-5
Open

Update script.js#1
KateDanKo wants to merge 2 commits intomainfrom
hometask-5

Conversation

@KateDanKo
Copy link
Copy Markdown
Owner

написала код

написала код
script.js Outdated
}

function generateForecast() {
const randomNumber = generateRandomNumber();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

передавать параметры нужно

script.js Outdated
const prediction = getPrediction(randomNumber);

currentForecastTitle.textContent = prediction;
currentForecastProbability.textContent = `Сгенерированное число: ${randomNumber}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Катя, тут не число сгенерированное для предсказаний (randomNumber )нужно, а вероятность от 0 до 100.

script.js Outdated
const currentForecastProbability = document.querySelector('.current-forecast p');

function generateRandomNumber() {
return Math.floor(Math.random() * 5) + 1;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Катя, тут нужна функция генерации числа в диапазоне. это нужно будет как для предсказания от 1 до 5, так и для вероятности от 0 до 100

все заново
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