JavaScript Quiz | For Beginners

JavaScript Quiz | For Beginners

1st Grade - University

10 Qs

quiz-placeholder

Similar activities

JAVASCRIPT 1

JAVASCRIPT 1

10th Grade

15 Qs

REACTOR

REACTOR

University

15 Qs

JavaScript Variables

JavaScript Variables

3rd Grade - University

13 Qs

10 Quiz#4: JavaScript Events

10 Quiz#4: JavaScript Events

10th Grade

12 Qs

Explore JavaScript

Explore JavaScript

University

15 Qs

CSC264 Javascript Basic

CSC264 Javascript Basic

University

15 Qs

JavaScript Quiz

JavaScript Quiz

University

12 Qs

Pierwszy quiz kl. 4-6, Strony internetowe sem.2

Pierwszy quiz kl. 4-6, Strony internetowe sem.2

4th - 6th Grade

10 Qs

JavaScript Quiz | For Beginners

JavaScript Quiz | For Beginners

Assessment

Quiz

Computers

1st Grade - University

Hard

Created by

Supreme-Cat Support

Used 2+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?