JavaScript MCQ : JS Basics (Multiple Choice Questions)


Question 1
Is this placement of JS code inside HTML Element is Error Free ?
<html><head><title>My Page</title>
</head>
<body>
<a href="javascript:myFunction();">Click here</a>
<script language="javascript" type="text/javascript">
function myFunction() {
    alert('Hello world');
}
</script>
</body>
</html>
A
Yes
B
No
Question 2
JS code included inside head section is loaded before loading page.
A
False
B
True
Question 3
It is good to include JS code inside footer section in order to speed up the Page loading time of Webpage.
A
False
B
True
Question 4
<script src="../main.js"></script>
Are you sure, Above code will include External JS inside your webpage.
A
Yes
B
No
Question 5
It is good programming procedure to include JS in a external sheet and make it available than writing inside HTML.
A
I Agree !!
B
I Don't Agree !!
There are 5 questions to complete.