📅  最后修改于: 2022-03-11 15:02:51.608000             🧑  作者: Mango
$('#form').on('submit', function (event) {
event.preventDefault();
var filterVal = parseInt($('#input').val(), 10);
var filtered = employees.filter(function (e) {
return e.salary >= filterVal;
}).map(function (e) {
return e.name;
});
console.log(filtered);
});