Search Header Logo

Java Script

Authored by Alaa Ahmad

Computers

7th Grade

Used 2+ times

Java Script
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct keyword to define a function in JavaScript?

func

local

function

def

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the two main types of scope in JavaScript?

Public and Private

Global and Local

Static and Dynamic

Open and Closed

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to find the length of an array or string in JavaScript?

pop()

push()

length

reverse()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following events is triggered when an element is clicked?

onclick

onmouseover

onkeydown

onchange

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which syntax is used to change the text color of an element with id="title" in JavaScript?

document.getElementById("title").color = "red";

document.getElementById("title").style.textColor = "red";

document.getElementById("title").style.color = "red";

document.style("title").color = "red";

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator checks both value and type for equality in JavaScript?

=

==

===

====

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the Math object in JavaScript?

To perform mathematical tasks without creating an instance

To store user data

To manipulate strings

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?