Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Max number
- // https://zero.p2p.shpp.me/tasks/5_1_func_get_max_number.html
- function max(x, y) {
- if (x > y) {
- return x;
- } else {
- return y;
- }
- }
- let firstNumber = +prompt("введи перше число");
- let secondNumber = +prompt("введи друге число");
- console.log(max(firstNumber, secondNumber));
Advertisement
Add Comment
Please, Sign In to add comment