JavaScript Quiz

JavaScript Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

R093 Creative iMedia TA3 (Docs to design & plan media products)

R093 Creative iMedia TA3 (Docs to design & plan media products)

9th - 10th Grade

10 Qs

Balises HTML & CSS

Balises HTML & CSS

8th Grade - University

20 Qs

HTML Tags

HTML Tags

9th - 12th Grade

18 Qs

Code.org App Lab

Code.org App Lab

6th - 12th Grade

15 Qs

HTML Introduction

HTML Introduction

9th - 12th Grade

15 Qs

PROYECTO DE DISEÑO WEB

PROYECTO DE DISEÑO WEB

10th Grade

10 Qs

R093 Creative iMedia TA1 (The media industry)

R093 Creative iMedia TA1 (The media industry)

9th - 10th Grade

10 Qs

Font Classification Practice Quiz

Font Classification Practice Quiz

10th - 12th Grade

20 Qs

JavaScript Quiz

JavaScript Quiz

Assessment

Quiz

Design

10th Grade

Easy

Created by

uthira C

Used 11+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to include an external JavaScript file in HTML?

<script src="app.js"></script>

<script href="app.js"></script>

<link src="app.js"></link>

<style src="app.js"></style>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare a variable in JavaScript?

var x = 10;

variable x = 10;

x := 10;

let 10 = x;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the result of the following code be? let a = 10 + "5";

15

105

50

Undefined

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to assign a value to a variable?

==

===

=

=>

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? let age = 18; if (age >= 18) { console.log("You are an adult."); } else { console.log("You are a minor."); }

"You are a minor."

"You are an adult."

Error

Undefined

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the result of this code be? let num = 7; if (num % 2 === 0) { console.log("Even number"); } else { console.log("Odd number"); }

Even number

Odd number

Undefined

Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to define a function in JavaScript?

function myFunction() { }

def myFunction() { }

func myFunction() { }

create function myFunction() { }