本文共 527 字,大约阅读时间需要 1 分钟。
function Bar(){}console.log(Bar.prototype === Function)console.log(Bar.prototype === Function.prototype)console.log(Bar.__proto__ === Function.prototype)console.log(new Bar().__proto__ === Bar.prototype)
function findLengthOfLCIS(nums){ let len = nums.length; if(len == 0){ return 0; } let maxSub = 1; let subLen = 1; for(let i = 0; i < len-1; i++){ if(nums[i] < nums[i+1]){ subLen++; }else{ subLen = 1; } if(subLen > maxSub){ maxSub = subLen; } } return maxSub;}var nums = [1,2,1,2,3];
转载地址:http://ohtzi.baihongyu.com/