JavaScript Quiz | For Beginners

JavaScript Quiz | For Beginners

1st Grade - University

10 Qs

quiz-placeholder

Similar activities

MS Word 2

MS Word 2

1st Grade

11 Qs

แบบทดสอบก่อนเรียน_หน่วยที่ 3_การพัฒนาโปรแกรม

แบบทดสอบก่อนเรียน_หน่วยที่ 3_การพัฒนาโปรแกรม

3rd Grade

10 Qs

ICT Grade 8

ICT Grade 8

8th Grade

10 Qs

OCR GCSE CS - 2.1 ERL sorts and searches

OCR GCSE CS - 2.1 ERL sorts and searches

10th - 11th Grade

9 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

GIT COURSE

GIT COURSE

University

13 Qs

Latihan Soal Informatika Analisis Data Kelas 7

Latihan Soal Informatika Analisis Data Kelas 7

7th Grade

14 Qs

LEDs on micro:bit

LEDs on micro:bit

8th Grade

15 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

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?