Multiple choice general knowledge

An external JavaScript must contain the tag

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

External JavaScript files (.js) contain only JavaScript code without any HTML tags. The script tag with the src attribute is placed in the HTML document to load the external file. If you include script tags in an external .js file, it would cause JavaScript syntax errors.