Q:

javascript getElementsByClassName("foo"||"bar")

Basically I want a snippet of javascript to add the height of the browser window to any elements with either of the classes fullscreen or fullheight
function fullsize(){
    var a = document.getElementsByClassName("fullscreen"),
        b = document.getElementsByClassName("fullheight");
    for (var i=0; i<a.length; i++){
        a[i].style.height = window.innerHeight + "px";
    }
    for (var j=0; j<b.length; j++){
        b[j].style.height = window.innerHeight + "px";
    }
}
window.addEventListener("load", fullsize),
window.addEventListener("resize", fullsize);

This (above) works perfectly well, I was just wondering if there was any way to condense it into just one for(){...} like the jQuery equiv.
function fullsizes(){
    $(".fullheight,.fullscreen").each(function(){
      $(this).height($(window).height())
    })
}

A:

You can use document.querySelectorAll

Returns a list of the elements within the document (using depth-first pre-order traversal of the document's nodes) that match the specified group of selectors. The object returned is a NodeList.

Code example
document.querySelectorAll(".fullscreen, .fullheight"); 

Change your to code
function fullsize(){
    var a = document.querySelectorAll(".fullscreen, .fullheight"); 
    for (var i=0; i<a.length; i++){
        a[i].style.height = window.innerHeight + "px";
    }
}

