JavaScripting

Quiz
•
Computers
•
University
•
Hard
Arjun Arjun
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Fundamentos HTML e CSS

Quiz
•
University
8 questions
CTI Web Dev. Week 6 Review

Quiz
•
6th Grade - University
10 questions
Python Dictionaries

Quiz
•
University
12 questions
01 HTML/CSS Einführung

Quiz
•
University
10 questions
NavBars en Bootstrap

Quiz
•
University
10 questions
Kuis 1 User Interface JWD

Quiz
•
University
5 questions
Repaso 3

Quiz
•
University
10 questions
Estructuras Condicionales

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University