Commit 80b73c96 authored by Nikolay Tarassenko's avatar Nikolay Tarassenko

Initial commit

parents
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script src="js/index.js"></script>
</body>
</html>
let bill = 10;
let userInput = prompt('Введите число');
const number = parseInt(userInput);
if (userInput !== null) {
if (!isNaN(number) && number > 0) {
alert('Число больше нуля');
bill += number;
}
if (!isNaN(number) && number < 0) {
alert('Число меньше нуля');
}
} else {
alert('Cancel');
}
alert(bill);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment