Inline vs External JavaScript
In general, we never should have embed JavaScript inside the same file as the HTML markup and should instead place the JavaScript into an external file. The content, presentation, and interaction code should all be separate to make your life easier as a website developer. Cleaner Code. Cleaner code is much quicker to find errors…