按键事件未触发

Keyup event not triggering

这是HTML代码。我输入了输入键和按下键。

<input type="text" id="filterInput" placeholder="Search names...">

这段代码有什么问题?

let filterInput;//(optional)
let filterInput = document.getElementById('filterInput');
filterInput.addEventListener('Keyup', filterNames);
function filterNames() {
    console.log(1);
}

"Keyup" 应该是 "keyup"

filterInput.addEventListener('keyup', filterNames);

工作fiddle:

https://jsfiddle.net/5mfz6o03/