How Do I Find Out or Detect Which Checkbox Was Selected?

I have multiple checkboxes in the one form. I cannot use combobox for this. It must be multiple checkboxes so asking if each checkbox was selected doesn't seem smart since there are 11 checkboxes and maybe more to come.

I'll do it that way if there is no other way.

Luckily I'm writing this in JXA.

The only thing I can think of is there must be a way to iterate through the checkbox instances to see which was checked.

Guys, whoever is reading this. Try to write if statements that set or get variables inside jxa. It is much more compact.