function setAttribute(el, attrs) {
    for (let [name, value] of Object.entries(attrs)) {
        if (value === undefined) continue;

        el.setAttribute(name, value);
    }
    return el;
}
Sets multiple attributes of element
@param {HTMLElement} el
@param {Object} attrs - attributes object
@returns {HTMLElement}