How to use api Show()?

Problem: I have this script, but I never get the Show() false behaviour. How to proceed?

function showHideProfileMenu(doc, e) {

var profilemenu =  doc.getElement('pm');
var pmstatus = profilemenu.isVisible();
//alert(pmstatus);
if (pmstatus == false) {
profilemenu.show();
} else {
profilemenu.show()=false; //or:profilemenu.show(0);???
}

}

Saola Animate version: 3.1.1

OS: Mac OS monterey

Notes:

Hi Hans,

show() or show(true) will show the element, show(false) will hide the element

Regards