
JavaScript Quiz | For Beginners
Authored by Supreme-Cat Support
Computers
1st Grade - University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
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
Scratch
Quiz
•
KG - Professional Dev...
12 questions
Adventure game project
Quiz
•
7th - 8th Grade
10 questions
Ôn tập về phần mềm soạn thảo văn bản
Quiz
•
1st - 5th Grade
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
15 questions
SD1 MLS1 EXCUL
Quiz
•
KG - 4th Grade
15 questions
Pre-Test-Com P.5
Quiz
•
5th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
LA1.C1: Introduction to Small Basic
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade