Skip to content
Advertisement

KeyError: ‘…’ keeps coming back

I keep getting the error and can’t find where the problem lies. I’m trying so I can choose wether I want the attack the creature or both printed and what type the creature is: ‘easy’, ‘medium’ or ‘hard’, I want to store that into a variable.

JavaScript

Thanks in advance

Advertisement

Answer

You might want something like:

JavaScript

Output: rat scratches

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement