Which statement correctly adds an element at index 2 of an array?
Anonymous Quiz
12%
arr.insert(2,5)
6%
arr.push(2,5)
73%
arr[2] = 5;
10%
arr.add(2,5)
What is the output of:
console.log(0.1 + 0.2 == 0.3);
console.log(0.1 + 0.2 == 0.3);
Anonymous Quiz
48%
true
40%
false
8%
Error
4%
undefined
What is the output of console.log(null == undefined)?
Anonymous Quiz
58%
true
27%
false
13%
Error
2%
undefined
How do you change the style of an element with ID "demo"?
Anonymous Quiz
65%
document.getElementById("demo").style.color = "red";
18%
document.getElement("demo").color = "red";
8%
document.querySelector("#demo").color = "red";
8%
document.style("demo").color = "red";
Which of the following is jQuery syntax to hide an element with ID "demo"?
Anonymous Quiz
12%
hide("#demo");
25%
$("#demo").style.display = "none";
29%
document.getElementById("demo").hide();
35%
$("#demo").hide();
How do you set the text of an element in jQuery?
Anonymous Quiz
39%
$("#demo").text("Hello")
26%
$("#demo").innerHTML = "Hello"
24%
document.getElementById("demo").text = "Hello"
11%
$("#demo").value = "Hello"
Which is the correct way to run code when the document is ready in jQuery?
Anonymous Quiz
21%
$(document).load(function(){ });
57%
$(document).ready(function(){ });
6%
window.onload = function(){ }
17%
document.onload = function(){ }
Output of : let person = {name: "Ali", age: 20};
console.log(person.name);
console.log(person.name);
Anonymous Quiz
3%
20
5%
person
91%
Ali
0%
name
Output of : <button onclick="alert('Hi')">Click me</button>
Anonymous Quiz
66%
Shows alert when clicked
6%
Error
3%
Nothing
24%
Prints "Hi" in console
Output of : let name = "Ali";
console.log(`Hello ${name}`);
console.log(`Hello ${name}`);
Anonymous Quiz
0%
name
6%
Hello
86%
Hello Ali
8%
Hello ${name}
Output of : let age = 20;
console.log(`I am ${age} years old`);
console.log(`I am ${age} years old`);
Anonymous Quiz
0%
Error
0%
age
8%
I am ${age} years old
92%
I am 20 years old
❤1
What is the output of :
function add(a, b) {
return a + b; } console.log(add(2, 3));
function add(a, b) {
return a + b; } console.log(add(2, 3));
Anonymous Quiz
3%
23
80%
5
9%
2+3
8%
error