I will grind on leetcode, can anybody review my solution It really help me. I solve this in javascript.

Question Link: https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/

Solution:

```
var kidsWithCandies = function(candies, extraCandies) {
const maxElement = Math.max(...candies);
const result = [];
for (let i = 0; i < candies.length; i++) {
let candie = candies[i] + extraCandies;
result.push(candie < maxElement ? false: true)
}
return result;
};
```

And Is wrost time complexity of this code is O(n)?