What's wrong with this code?

Hi - I can’t figure out what’s wrong with this code. It’s saying I need semicolons (but where?) and that I need to define ‘type’ and ‘require’ and I’m pretty sure it doesn’t mean the English definition. Can you help?

20 AM

type is an attribute of the script tag, you made a small mistake assigning the attribute correctly to the opening tag

what lesson is this? If not lesson related, what setup is used?

1 Like

I’m embedding a mailchimp code into my wordpress site. Unfortunately, wordpress doesn’t like their original code. This is the original code that I’m trying to fix:

Oops, I already see some of the things I’ve edited incorrectly …

require() is not part of your standard JavaScript, so you can’t just use it

require() is part of nodeJS to load modules. Quite a difference there

1 Like

I see that. Using nodeJS doesn’t quite make the code work. So I just can’t use/fix the code?

impossible to say for me, i know some nodeJS/javascript), but without a copy of the problem in which i can fiddle, i have no idea.

If its specific related to wordpress, i would go to the wordpress community

if you really want help here on the forum, i recommend you to make a new topic and include all the important details (its wordpress related, how and where you are running the JS code, and ideally something we can work with, although be it a copy with the bug)


Hi! I don’t know nothing about Wordpress but after a quick search, looks like the problem (and possible fix) is here.


1 Like