Vidyalelo
JavaScript · Q52

Invocation And Performance Navigation

Programming · JavaScript · question 52

Q52

What will happen if the browser encounters a script tag without an src attribute?

A.
Throws an error
B.
Throws an exception
C.
Sends it to the compiler
D.
Sends it to the interpreter
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
If the browser encounters a script tag without a src attribute, the rendering engine simply passes the code to the JavaScript Interpreter for execution.