I don’t know much about this, just having recently started with JavaScript, so simple language would be greatly appreciated.
Whenever I insert JavaScript on a page, it appears in the preview as text on the page and when I update my site it also appears this way. How would I fix this?
Thank you in advance.
There are two ways to inject JavaScript into a page.
Inline in either the head or body of your html page.
Or you can link to an external JavaScript file from the head of your html document.
Just remember: if the javascript is an external file, save it with the .js extension.