How do I have a single export function for multiple events

I am completely new to javascript coding having only a background in HTML and CSS. I am trying to create a custom popup menu that will disappear when I either mouseoff the box or the button. The code that I have right now is pasted below:

export function button6_onMouseIn(event) {
$w( “#box7” ).show();
}
/ /I would like to add an either or type statement herefor the following two conditions, but everything I have tried yields an error code//
export function box7_onMouseOut(event) {
$w( “#box7” ).hide();
}
export function button6_onMouseOut(event) {
$w( “#box7” ).hide();
}