The Agrippa Defense java script. MAJOR HELP😐

Hi,
Here’s how you format your code:

I did it for you this time.
The problem is in that line. What is target? Where is it defined? Have you checked if it exists?
Danny