πŸ“Š JavaScript
Q. The external JavaScript file must contain the <script> tag?.
  • (A) True
  • (B) False
  • (C) ---
  • (D) ---
πŸ’¬ Discuss
βœ… Correct Answer: (B) False

Explanation:

The answer is (B) False.

Explanation:

  • In an external JavaScript file (like script.js), you should not include the <script> tag inside the file.
  • The external file should contain only JavaScript code.
  • You include it in an HTML page using:
<script src="script.js"></script>

But inside script.js, you do not write <script> ... </script>. Only pure JavaScript code like:

console.log("Hello from external JS!");

Explanation by: Mr. Dubey

The answer is (B) False.

Explanation:

  • In an external JavaScript file (like script.js), you should not include the <script> tag inside the file.
  • The external file should contain only JavaScript code.
  • You include it in an HTML page using:
<script src="script.js"></script>

But inside script.js, you do not write <script> ... </script>. Only pure JavaScript code like:

console.log("Hello from external JS!");

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
174
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Yogesh
Publisher
πŸ“ˆ
86%
Success Rate