Hi Jeremy,
I apologize for delay in response. Are you getting this error while clicking on check syntax button on the Simple Javascript rule? Can you please share some more details on the error because syntax looks good to me. I just tried to run this code in my instance and it looks fine.
Thanks,
Amit