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

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: d
Explanation: If the browser encounters a script tag without an src attribute, the rendering engine simply passes the code to the JavaScript Interpreter for execution. The src attribute specifies the location (URL) of the external resource.
 

Tìm kiếm

Back
Top