Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GreaterNumber(input) {
- let firstNumber = parseInt(input[0]);
- let secondNumber = parseInt(input[1]);
- if (firstNumber > secondNumber)
- console.log(firstNumber);
- else
- console.log(secondNumber);
- }
- Второ решение:
- function GreaterNumber(input) {
- if (parseInt(input[0]) > parseInt(input[1]))
- console.log(input[0]);
- else
- console.log(input[1]);
- }
- Тарикатско решение:)
- function GreaterNumber(input) {
- console.log(parseInt(input[0]) > parseInt(input[1])? input[0] : input[1]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement