Can anyone tell me why compiler keeps saying chainToSwitch(1) should be "There is no #1" ?/

Continuing the discussion from Replacing If Else Chains with Switch:

The person you are referring to is passing an undefined variable bob to chainToSwitch() function.

That function accepts integers and strings, if you want to pass the name bob to it, be sure to pass it as a string "bob".

Strings should be enclosed in single or double quotes. => Declare String Variables.