I have the following function
var VisibilityNewDevice = 1
function visibilityNewDevice() {
if (VisibilityNewDevice === 1) {
toggleVisibility('buttonPressesTable'),
toggleVisibility('IconMinimize'),
toggleVisibility('IconSync');
var VisibilityNewDevice = 0;
}
}
Which if I call visibilityNewDevice() I get undefined returned and doesn't run the code. However if I run the like this
if (VisibilityNewDevice === 1) {
toggleVisibility('buttonPressesTable'),
toggleVisibility('IconMinimize'),
toggleVisibility('IconSync');
var VisibilityNewDevice = 0;
}
It works fine. I'm confused why the function doesn't work, but when I run the if statement it works fine.