Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

filtering buttons parseint javascript

$('#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);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #filtering #buttons #parseint #javascript
ADD COMMENT
Topic
Name
3+6 =