Session.setItem / Session.getItem

First of all, thanks for the time your are taking on answering
Second, appologies if I write some misconceived code, as I have a few weeks of coding, so I am at the begining of my learning curve

In your example of session.setItem usage, I see you use an onclick event and as key for the session.setItem you use an element on the page $w(“#inputMain”).value

I would like to use any key, as I understand wix uses in the refered article. They made up a key ( firstTimePopupShown in their example) and give it a value. I am trying to replicate what they do, as it is very simple (saddly not to me though)

Code extracted from wix article: https://support.wix.com/en/article/corvid-tutorial-creating-a-one-time-popup

$w.onReady( function () {
// flag is not found
if (!session.getItem( “firstTimePopupShown” )) {
// open popup
wixWindow.openLightbox( “Announcement” );
// set flag for future visits
session.setItem( “firstTimePopupShown” , “yes” ); } } );

Thanks again