If the length of the string (which is the variable "d" in your example) being passed in is less than 1 character long (in other words empty), return.
"return" immediately stops the function it's inside of and returns the value after it. In the case of no value, it simply stops the function.
Example:
Code:
function ShowMessage() {
return;
alert('Hi There');
}
The above example will never alert anything when you call ShowMessage() because it returns before you reach the alert;
Code:
function ShowMessage() {
alert('Hi There');
return;
alert('I love Ice Cream');
}
The above example will alert "Hi There", but not "I love Ice Cream".
Additionally,
Code:
if (d.length < 1) {return;}
means the same thing as:
Code:
if (d.length < 1) {
return;
}
Hope this answers your question.