Skip to content

Commit 62fa7a8

Browse files
authored
Create 2798-number-of-employees-who-met-the-target.js
1 parent f01cfca commit 62fa7a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @param {number[]} hours
3+
* @param {number} target
4+
* @return {number}
5+
*/
6+
var numberOfEmployeesWhoMetTarget = function(hours, target) {
7+
let res = 0
8+
for(const e of hours) {
9+
if(e >= target) res++
10+
}
11+
12+
return res
13+
};

0 commit comments

Comments
 (0)