(I did indeed read the rules of this forum and while I'm not a "seasoned" javascript coder I thought that this script was simple enough to not matter. If that is unacceptable I apologize and you can feel free to delete this post)
Here is a function that allows you to use a PHP like 'empty()' function. It helped me a lot because it combines several other JS functions into one neat package.
Code:
function empty(obj) {
if (typeof obj == 'undefined' || obj === null || obj === '') return true;
if (typeof obj == 'number' && isNaN(obj)) return true;
if (obj instanceof Date && isNaN(Number(obj))) return true;
return false;
}
Hope this helps people as much as it helps me!