In my example the original code assigned a different value to a variable depending on the switch case statement. Played with chatGPT and it assigned case A value outside switch and left case B, ignoring that if case B then makes outside wo