dabidabidesh

Untitled

Jun 1st, 2020
299
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function maxNumber0(arr) {
  2.   'use strict'
  3.  
  4.   let output = ''
  5.   for (let i = 0; i < arr.length; i++)
  6.     if (isTopInteger0(arr, i))
  7.       output += arr[i] + ' '
  8.   console.log(output)
  9.  
  10.   function isTopInteger0(arr, index) {
  11.     let flag = true
  12.     for (let i = index + 1; i < arr.length; i++)
  13.       if (arr[index] <= arr[i])
  14.         return false
  15.     return flag
  16.   }
  17.  
  18. }
RAW Paste Data