Right-hand side of 'instanceof' is not an object

Please help me fix this command, it was working fine until I changed what one of the options said and now it says “right-hand side of ‘instanceof’ is not an object” as the output

!Editcom !Death $(user) $(eval a=[‘Died In a fire.’, ‘Was crushed by a storage container.’, ‘Fell into a pit of poisonous snakes.’, ‘Was flattened by a steamroller.’, ‘Got their head chopped off.’, ‘Survived this time.’, ‘Drowned in a pool.’, ‘Fell off a bridge’, ‘Watched to much of Kizzh’s bad sniping.’, ‘Bled out from a bullet wound.’, ‘Fell in front of a moving train.’, ‘Died mysteriously.’, ‘Suffocated to death’, ‘Was choked out.’];a[Math.floor(Math.random()*a.length)])

The text values are wrapped around by single quotes, now when you use a single quote inside the text it will act as the end of the text.

Multiple solutions:
Escape the quote by adding a slash in front of the quote:
'this is Kizzh\'s test text'

Use different quotes to surround the text values:
"this is Kizzh's test text"
`this is Kizzh's test text`

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.