Which of the following is the correct syntax to display “CodeMaster” in an alert box using JavaScript?
JavaScript Quiz | For Beginners

Quiz
•
Computers
•
1st Grade - University
•
Hard
Supreme-Cat Support
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Quizizz
15 questions
Basic JavaScript Programming Quiz

Quiz
•
5th Grade
15 questions
JavaScript basics

Quiz
•
8th Grade - University
12 questions
HTML & Java

Quiz
•
9th Grade
12 questions
JS quiz

Quiz
•
10th Grade
10 questions
Introduction to PHP: Hypertext Preprocessor

Quiz
•
11th - 12th Grade
10 questions
JavaScript Cert Prep

Quiz
•
9th - 12th Grade
12 questions
JavaScript

Quiz
•
9th Grade
10 questions
JavaScript quiz for beginners

Quiz
•
7th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade