JavaScript Quiz | For Beginners
Quiz
•
Computers
•
1st Grade - University
•
Hard
Supreme-Cat Support
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to display “CodeMaster” in an alert box using JavaScript?
alertbox(“CodeMaster”);
alert{“CodeMaster”};
alert(CodeMaster);
alert(“CodeMaster”);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for referring to an external script called “script.js”?
<script src=”script.js”>
<script href=”script.js”>
<script ref=”script.js”>
<script src=”script.js()”>
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following JavaScript code:
<script type="text/javascript">
a = 8 + "8";
document.write(a);
</script>
16
Compilation Error
88
Run Time Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following JavaScript code.
<script type="text/javascript">
var a="GeeksforGeeks";
var x=a.lastIndexOf("G");
document.write(x);
</script>
8
0
9
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a reserved word in JavaScript?
interface
throws
program
short
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following JavaScript code:
<script type="text/javascript" language="javascript">
var x=5;
var y=6;
var res=eval("x*y");
document.write(res);
</script>
“30”
30
5*6
“5*6”
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which built-in method returns the character at the specified index?
characterAt()
getCharAt()
charAt()
None of These
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
NHTW Programming
Quiz
•
9th Grade
15 questions
5.th sosyal bilgiler 5.ünite
Quiz
•
5th Grade
10 questions
Интерфейс мобильных приложений
Quiz
•
10th - 11th Grade
9 questions
Test Excel
Quiz
•
10th - 12th Grade
12 questions
Porcentajes
Quiz
•
University
10 questions
For loop
Quiz
•
8th Grade
10 questions
แบบทดสอบ เรื่อง การค้นหาข้อมูลบนอินเทอร์เน็ต
Quiz
•
3rd Grade
12 questions
prep1-revision
Quiz
•
7th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
