Identifying which Radiobutton is selected through code

@tony-brunsman I figured it out! I removed the second if statement, and it works now. Thank you so much for your help, much appreciated!

export function radiobuttongroup1_change(event) {
//Add your code for this event here:

if ($w(‘#radiobuttongroup1’).selectedIndex === 2) {

   $w('#box').expand();      
}  **else**  {             
   $w('#box').collapse();  
} 

}