Array.slice HTMLCollection, . concat, , , :
function getElementsByTagNames(context, tags) {
var res = [],
i = tags.length,
slice = Array.prototype.slice;
while(i--) res.push(slice.call(context.getElementsByTagName(tags[i])));
return Array.prototype.concat.apply([], res);
}
getElementsByTagNames(document.body, ['input', 'textarea']);
, . <input>, , <textarea> .