I get this is a cool feature of javascript, but to me it feels like a code smell.  I don't necessarily want to read your comment to know that you actually do intend to return undefined.  I'd rather start the function with a "var result = undefined;"  set "result = currentlyVisibleTimeRange.clone()" in the if, and then always "return result;" at the end of your function.  That way it's explicit in what it expects to be returning.