What is the output of console.log(typeof function(){})?
Anonymous Quiz
70%
function
11%
object
11%
undefined
9%
method
Which operator returns the type of a variable?
Anonymous Quiz
11%
type
81%
typeof
6%
instanceOf
2%
typeOf
Which statement correctly imports a JS module?
Anonymous Quiz
73%
import {x} from ./file.js;
6%
require {x} from ./file.js;
8%
include ./file.js;
13%
import x from ./file.js
Which property changes the content of an HTML element?
Anonymous Quiz
76%
innerHTML
10%
innerText
10%
textContent
4%
value
How do you access an element by its ID?
Anonymous Quiz
76%
document.getElementById(myId)
6%
document.getElement(myId)
12%
document.querySelector(myId)
6%
document.find(myId)
Which method adds a new element to the HTML DOM?
Anonymous Quiz
45%
document.createElement(div)
27%
document.addElement(div)
20%
document.newElement(div)
8%
document.insertElement(div)
Which event occurs when the user clicks on an element?
Anonymous Quiz
80%
onclick
12%
onmouseover
6%
onkeydown
2%
onhover
How do you select all <p> elements in jQuery?
Anonymous Quiz
47%
$(p)
29%
document.getElementsByTagName(p)
12%
$(#p)
12%
$(p).selectAll();
What is a main advantage of jQuery over plain JS?
Anonymous Quiz
14%
Shorter syntax
20%
Works in all browsers easily
4%
Provides built-in animations
61%
All of the above
console.log(Hello World.includes(World)); Output:
Anonymous Quiz
46%
true
10%
false
6%
Error
38%
World
What is the main purpose of the jQuery library?
Anonymous Quiz
4%
To design images
85%
To simplify DOM and JavaScript coding
8%
To store data in a database
2%
To speed up the internet
Which of the following is the correct syntax to start jQuery?
Anonymous Quiz
15%
document.ready(function(){ ... });
67%
$(document).ready(function(){ ... });
17%
$(document).ready();
2%
ready(document);
Which code selects all <p> elements and hides them?
Anonymous Quiz
10%
hide(p);
67%
$(p).hide();
17%
document.getElementById(p).hide();
6%
$(p).display(none);
In jQuery, which method is used to change the content of an HTML element?
Anonymous Quiz
11%
.val()
6%
.css()
77%
.html()
6%
.attr()
Which code sets the text of an element with id demo to Hello?
Anonymous Quiz
57%
$(#demo).html(Hello);
35%
$(demo).text(Hello);
4%
$(p#demo).value(Hello);
4%
$(demo).html(Hello);