
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
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
10 questions
ICT Grade 8
Quiz
•
8th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
10 questions
INTRODUCCION A LA PROGRAMACION
Quiz
•
6th Grade - University
13 questions
GIT COURSE
Quiz
•
University
15 questions
Excel
Quiz
•
5th - 6th Grade
12 questions
Google Clssroom Google Sites
Quiz
•
7th Grade
15 questions
LEDs on micro:bit
Quiz
•
8th 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