What is true about a variable declared with "const" in JavaScript?
Anonymous Quiz
41%
The variable must be initialized at the time of declaration.
41%
The value of the variable can never change.
14%
The reference of an object or array declared with const can change.
5%
const variables are function-scoped.
How can you select the element with the id 'example' in CSS?
Anonymous Quiz
26%
.example
8%
example
62%
5%
*example
What will this code output to the console?
Difficulty: Easy 😁
Difficulty: Easy 😁
function add(a, b) {
return a * b;
}
const result = add(5,'2');
console.log(result);What is the purpose of the data-* attribute in HTML?
Anonymous Quiz
20%
To specify CSS styles
23%
To define default values for form fields
20%
To link to external resources
37%
To store custom data private to the page or application
What programming language are you interested in for your next test?
Anonymous Poll
40%
Python
16%
Java
7%
C++
23%
PHP
14%
Other
Find the error in the code.
The answer should be: 0, 1
Difficulty: Average😐
The answer should be: 0, 1
Difficulty: Average😐
const createCounter = () => {
let count = 0;
return () => {
console.log(count++);
};
};
const counter1 = createCounter();
const counter2 = createCounter();
counter1();
counter2();What is the correct way to create a variable with the value of 5 in Python?
Anonymous Quiz
34%
int x = 5
39%
x = 5
26%
let x = 5
0%
5 = x
What does the push() method do for an array in JavaScript?
Anonymous Quiz
3%
Retrieves the last element
15%
Removes the last element
30%
Adds one or more elements to the beginning
52%
Adds one or more elements to the end
🔥1
Which tag is used to define an HTML table header?
Anonymous Quiz
33%
<header>
45%
<th>
18%
<head>
4%
<tr>
How can you ensure that an element always stays at the bottom of its parent container?
Anonymous Quiz
38%
position: fixed; bottom: 0;
15%
position: sticky; bottom: 0;
44%
position: absolute; bottom: 0;
3%
position: relative; bottom: 0;
Find the error in the code.
Difficulty: Average😐
Difficulty: Average😐
numbers = [1, 2, 3, 4, 5]
total = 0
for number in numbers:
total += number
print("The total is: " + total)
What is a correct syntax to output "Hello World" in Python?
Anonymous Quiz
81%
print("Hello World")
6%
echo "Hello World"
10%
console.log("Hello World")
4%
printf("Hello World")
❤1🔥1
How can you open a link in a new tab/browser window?
Anonymous Quiz
2%
<a href="url" target="_self">
54%
<a href="url" target="_blank">
25%
<a href="url" target="_new">
19%
<a href="url" target="_window">
❤2
Preparing for an interview? Check out all the key questions right here!