How to use SelectOption?

Okay, this is probably a stupid question, but I’m brand new to this and struggling…

If I add an IonSelect, how do I use the selected information? It has this in it:
onIonChange={e => setSubject(e.detail.value)}

So, I assume I can create a function setSubject(e), and then do something with the ‘e’ value, but I can’t figure out where to put it or how to make it work? I’m familiar with javascript and jquery and such for websites, but this is just different enough that I can’t figure it out… Help!

Thanks.