Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function maxNumber0(arr) {
- 'use strict'
- let output = ''
- for (let i = 0; i < arr.length; i++)
- if (isTopInteger0(arr, i))
- output += arr[i] + ' '
- console.log(output)
- function isTopInteger0(arr, index) {
- let flag = true
- for (let i = index + 1; i < arr.length; i++)
- if (arr[index] <= arr[i])
- return false
- return flag
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement