JavaScript easy single loop
Intuition\n Describe your first thoughts on how to solve this problem. \n    increasing the counter by comparing elements in an array\n# Approach\n Describe you
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n    increasing the counter by comparing elements in an array\n# Approach\n<!-- Describe your approach to solving the problem. -->\ncompare two elements nums[i] and nums[i-1], if i is greater we include it, so count++, if not we reset counter to 1 and count again for any better LCIS in the array.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(1)\n# Code\n```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar findLengthOfLCIS = function (nums) {\n  let count = 1;\n  let max = 1;\n  for (let i = 1; i < nums.length; i++) {\n    if (nums[i - 1] < nums[i]) {\n      count++;\n    } else {\n      count = 1;\n    }\n    max = Math.max(max, count);\n  }\n  return max;\n};\n```
['JavaScript']