JavaScript Clean 2 Sliding-Window Approaches
Solution 1\n\n\nvar findLengthOfLCIS = function(nums) {\n    let len = 1, maxLen = 0;\n    \n    for(let i = 0; i < nums.length; i++) {\n        if(nums[i] < nu
## Solution 1\n\n```\nvar findLengthOfLCIS = function(nums) {\n    let len = 1, maxLen = 0;\n    \n    for(let i = 0; i < nums.length; i++) {\n        if(nums[i] < nums[i+1]) len++;\n        else len = 1;\n        maxLen = Math.max(len, maxLen);\n    }\n    return maxLen;  \n};\n```\n\n## Solution 2\n\n```javascript\nvar findLengthOfLCIS = function(nums) {\n    if(nums.length < 2) return nums.length;\n    let left = 0, right = 1, maxLen = 0;\n    \n    while(right < nums.length) {\n        if(nums[right-1] >= nums[right]) left = right;\n        right++;\n        maxLen = Math.max(right - left, maxLen);\n    }\n    return maxLen    \n};\n```
['Sliding Window', 'JavaScript']