I\'ve got this code that checks for the empty or null string. It\'s working in testing.
eitherStringEmpty= (email, password) ->
emailEmpty = not email? or
Here is a jsfiddle demonstrating a very easy way of doing this.
Basicly you simply do this is javascript:
var email="oranste";
var password="i";
if(!(email && password)){
alert("One or both not set");
}
else{
alert("Both set");
}
In coffescript:
email = "oranste"
password = "i"
unless email and password
alert "One or both not set"
else
alert "Both set"
Hope this helps someone :)