Ability requires memory, at least for basic things.
You can't be a good programmer and forget the syntax of the language you are working in. If you need to look up something as fundamental as switch statement in the internet, it's like a writer looking up words in the dictionary before writing them down in his novel.
I think switch is a particularly bad example here. Honestly, I can't (accurately) tell you the last time I used one. It's not an every-day construct for a lot of people.