Vidyalelo
JavaScript · Q3

Basic And Variables

Programming · JavaScript · question 3

Q3

The script tag must be placed in

A.
head
B.
head and body
Answer
C.
title and head
D.
all of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
If the script tag is placed after the body tag, then, it will not be evaluated at all. Also, it is always recommended and effective to use the script snippet in the <head> tag.