Bash - what's the use of "fi ;;"?

Solution 1:

fi closes the if statement, while ;; closes the current entry in the case statement.

Solution 2:

The fi is to close the if-block in the y) case statement and the ;; is used to end the y) case.