Easy understable code javascript
ja# Approach\n Describe your approach to solving the problem. \nIterate the array find the value \nif value is greater than zero return 1\nif value is lesser th
ja# Approach\n<!-- Describe your approach to solving the problem. -->\nIterate the array find the value \nif value is greater than zero return 1\nif value is lesser than zero return -1\nif value is equal to zero return 1\n\n\n# Complexity\n- Time complexity: linear time complexity\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar arraySign = function(nums) {\n    let value=1;\n    for(let i=0;i<nums.length;i++){\n        value=value*nums[i];\n    }\n    if(value>0){\n        return 1\n    }else if(value<0){\n        return -1\n    }else{\n        return 0\n    }\n};\n```
['Array', 'JavaScript']