Should functions always return something (Javascript)

Viewed 7795

Should functions always return something? I often write very basic functions which are used as shorthand to do things that happen a lot such as:

function formsAway() {
    $("#login_form, #booking_form").slideUp();
}

Should this function exist - is there a better way, or is this fine?

4 Answers
Related