angry professor javascript

JavaScript
const angryProfessor = (k, a) => a.filter(v => v < 1).length < k ? 'YES' : 'NO'

Source

Also in JavaScript: