SOURCE

function findLong(arr){
    let length = 0;
    for(let i = 0; i < arr.length-1; i++){
        let nums = 1;
        let temp = arr[i];
        for(let j = i; j < arr.length; j++){
            if(arr[j] > temp){
                temp = arr[j]
                nums++;
            }
        }
        if(nums>length){
            length = nums;
        }
    }
    return length;
}
let arrSet = [10,9,2,5,3,7,101,18]
findLong(arrSet)
console 命令行工具 X clear

                    
>
console