JavaScript reduzieren Formobjekt

// Grabbing form values based on input id
var vals = () => Array.from(form.querySelectorAll('input'))
    .concat(Array.from(form.querySelectorAll('textarea')))
    .reduce((prev, curr) => {
        var key = curr.id;  // curr.name could also work here
        var val = curr.value;
        prev[key] = val;
        return prev;
}, {});
DJ Ultimate Disco Party