I finally figured out something that has been bugging me a bit after reading a section of the book Javascript & JQuery By Jon Duckett which involves 'logical short-circuiting' in Javascript. In Javascript, logical operators don't always return true or false. They return the value that stopped the processing.
For example:
var test = "a";
var testA = (test || 'unknown');
console.log(testA);
In an or statement, once one item is true, there is no need to check another, so processing is stopped. The value that stopped the processing of the "or" in variable TestA is the variable test. After test was determined to be a 'truthy' value, there was no need to evaluate the rest of the expression and therefore, the variable test, which evaluates to "a" is returned, as the console.log shows. If no value 'stops' the processing since all values are false, the final 'falsey' value is returned.
var test2 = null;
var testB = (test2 || 'unknown');
console.log(testB);
In this case, console.log will print out 'unknown' since 'unknown' is the true value that stops the processing.
var testC = (null || undefined || 0 || null);
console.log(testC);
In this case, console.log will print out 'null' since all of the values are falsey, including null, and null is the last value, and therefore it is returned when the expression is evaluated.
Now here is a very interesting case that demonstrates what was being said:
var testD = (null || undefined || 0 || false || 5 || null);
console.log(testD);
In this case, "5" will be printed out since it is the first true value, and the value that 'stops the processing'.