Correct.
- you click a menu-item
- you get the menu-data
- you create an if-else-condition
- you start a function → regarding the result of → IF-ELSE-CONDITION
if(label === 'xyz') {console.log('do something')}
else {console.log('do something else');}
Correct.
if(label === 'xyz') {console.log('do something')}
else {console.log('do something else');}