JavaScript Basics

JavaScript Basics

9th Grade - University

50 Qs

quiz-placeholder

Similar activities

9.1.4 Python Quiz 🐍

9.1.4 Python Quiz 🐍

9th Grade

48 Qs

Grade 6 Computer Practice

Grade 6 Computer Practice

6th - 8th Grade

55 Qs

HTML

HTML

8th Grade

54 Qs

Google Sheets Revision 1

Google Sheets Revision 1

6th - 10th Grade

50 Qs

ULANGAN HARIAN 3 -  SISTEM KOMPUTER

ULANGAN HARIAN 3 - SISTEM KOMPUTER

10th Grade - University

50 Qs

Ôn tập ic3 spark sau mùa covid-19

Ôn tập ic3 spark sau mùa covid-19

1st - 2nd Grade

49 Qs

HCI MIDTERM EXAMINATIONS

HCI MIDTERM EXAMINATIONS

12th Grade

50 Qs

TTL QUIZ 2

TTL QUIZ 2

KG - University

50 Qs

JavaScript Basics

JavaScript Basics

Assessment

Quiz

Computers

9th Grade - University

Hard

Created by

Dena L.

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

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

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which HTML element can we write JavaScript in?

<scripting>

<script>

<js>

<source>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How will this line of code be evaluated?


Number("1") - 1 == 0;

true

false

TypeError

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result?


(true + false) > 2 + true;

true

false

Nan

TypeError

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct JavaScript syntax to modify the content of the HTML element?


<p id="greeting">Hello, World!</p>

document.getElementById("greeting").innerHTML = "Hello there!";

#greeting.innerHTML = "Hello there!";

document.getElementByName("p").innerHTML = "Hello there!";

document.getElement("p").innerHTML = "Hello there!";

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where is the correct place to insert JavaScript code within an HTML document?

in the <head> section

in the <body> section

before the !DOCTYPE statement

between the <head> and <body> section

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct syntax for referring to an external JavaScript script?

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

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

<js href="myscript.js"></js>

<js src="myscript.js"></js>

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you write Hello World in an pop up box?

msg("Hello World");

alertBox("Hello World");

console.log("Hello World");

alert("Hello World");

Access all questions and much more by creating a free account

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?