What would the above code produce?html> body> script type="text/javascript">!— document.print("Hello"); //--> /script> /body> /html>
A. Greetings
B. Due to the comment, nothing will be printed.
C. Error Will Be Thrown
D. None of these
Answer:A
What would the above code produce?html> body> script type="text/javascript">!— document.print("Hello"); //--> /script> /body> /html>
A. Greetings B. Due to the comment, nothing will be printed. C. Error Will Be Thrown D. None of these
Explanation: The comment prevents JS from being shown as page content in older browsers.