JavaScript Quiz

JavaScript Quiz

10th Grade

15 Qs

quiz-placeholder

Similar activities

Design Basics Quiz

Design Basics Quiz

9th - 12th Grade

20 Qs

Diagnóstico de Programación Web

Diagnóstico de Programación Web

5th Grade - University

10 Qs

UH DDG KD 3.8

UH DDG KD 3.8

10th Grade

10 Qs

Scratch: Events, Loops and The Coordinate System

Scratch: Events, Loops and The Coordinate System

2nd Grade - Professional Development

15 Qs

Asesmen Diagnostik Front End

Asesmen Diagnostik Front End

10th Grade

15 Qs

UIUX Design

UIUX Design

1st - 10th Grade

10 Qs

Dasar Desain Grafis KH

Dasar Desain Grafis KH

10th Grade

20 Qs

Graphic Design Review 3

Graphic Design Review 3

9th - 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() { }