JavaScripting

JavaScripting

University

10 Qs

quiz-placeholder

Similar activities

Aprendeu ou disfarçou?

Aprendeu ou disfarçou?

12th Grade - Professional Development

10 Qs

BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ

BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ

6th Grade - University

14 Qs

Pengantar Coding

Pengantar Coding

University

10 Qs

HTML DOJO 1

HTML DOJO 1

University

10 Qs

sistema de archivos

sistema de archivos

University

15 Qs

PMBOK Quiz

PMBOK Quiz

KG - University

10 Qs

FST Class 2023- Quiz 2

FST Class 2023- Quiz 2

University

10 Qs

03 - Tree & BST

03 - Tree & BST

University

15 Qs

JavaScripting

JavaScripting

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Arjun Arjun

Used 3+ 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

10 sec • 1 pt

What is the correct syntax for referring to an external script “index.js” ?

<script name=”index.js”>

<script href=”index.js”>

<noscript src=”index.js”>

<script src=”index.js”>

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is not a keyword used to define a variable in ES6?

var

val

const

let

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following lines of code can remove the class “nav” from the following element:


<div><div class=”nav”>Hello</div></div>

document.getElementByClass(“nav”).classList.remove(“nav”)

document.getElementById(“div”).removeClass(“nav”)

document.querySelectorAll(“div”).classList.remove(“nav”)

document.querySelector(“div”).removeClass(“nav”)

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is not valid when creating a function in JavaScript ?

function ( ) => { }

function functionName( ) = { }

function functionName( ) { }

const myFunction = functionName( ) { }

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How can one get an attribute “attr” of an element <foo> ?

foo.attributes[0]

foo.attr

foo.attributes.attr

None of the above

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How will you return an element with id=”first” ?

document.getElementById(“first”)

document.querySelector(“#first”)

document.querySelector(“.first”)

A and B both

A and C both

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How will you change the content inside an element <foo> to the text “Hello World” ?

foo.innerHTML = “Hello World”

foo.innerContent = “Hello World”

foo.innerText = “Hello World”

A and C both

B and C both

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?

Discover more resources for Computers