What does the :nth-child() pseudo-class do in CSS?
Anonymous Quiz
24%
It applies styles to every child element of a specific type
41%
it selects elements based on their index among siblings
18%
it selects the first child element of a specific type
18%
it selects elements based on their parents
The task is to write a palindrome function.
Difficulty: Hard๐ค
Difficulty: Hard๐ค
isPalindrome("radar"); // true
isPalindrome("hello"); // falseWhat is the purpose of the "If" statement in JavaScript?
Anonymous Quiz
69%
To execute a block of code conditionally
9%
To define a function
14%
To create a loop
9%
To declare a variable
What is the "useState" hook in React used for?
Anonymous Quiz
20%
To define component style
17%
To manage global state
7%
To create routing in React
57%
To manage component state in functional components
๐2โค1
Find the error in the code.
Difficulty: Easy๐
Difficulty: Easy๐
function add(a, b) {
return a + b;
}
const result = add(5);
console.log(result);What is the purpose of the "Context API" in React?
Anonymous Quiz
12%
To define component style
35%
To manage global state
19%
To create routing in React
35%
To fetch data from external APIs
โคโ๐ฅ1๐1๐1
What does the "margin: 0 auto;" CSS rule do?
Anonymous Quiz
21%
Adds a 0-pixel margin at the top and bottom
18%
Removes all margins from an element
52%
Centers an element horizontally within its container
9%
Applies a margin only to the left side of an element
Find the error in the code.
Difficulty: Hard๐ค
Difficulty: Hard๐ค
async function fetchData() {
const response = await fetch('https://api.example.com/data');
const data = await response.json();
return data;
}
async function processData() {
const data = fetchData();
console.log(data);
}
processData();Which HTML tag is used to define a list of key-value pairs?
Anonymous Quiz
32%
<list>
30%
<dl>
18%
<ul>
20%
<ol>
JavaScript Task
Write a double function that takes an array of numbers and returns a new array with each number multiplied by 2.
Difficulty: Average๐คจ
Write a double function that takes an array of numbers and returns a new array with each number multiplied by 2.
Difficulty: Average๐คจ
const numbers = [1, 2, 3, 4, 5];
const doubledNumbers = double(numbers);
console.log(doubledNumbers);
Which JavaScript method is used to create a new instance of a Date object?
Anonymous Quiz
17%
Date.create()
46%
new Date()
10%
Date()
27%
Date.new()
Find the error in the code.
Difficulty: Average๐คจ
Difficulty: Average๐คจ
const person = {
name: "John",
greet: function() {
setTimeout(function() {
console.log(Hello, my name is ${this.name});
}, 1000);
}
};
person.greet();Which CSS property is used to create space between elements on a page?
Anonymous Quiz
45%
margin
11%
border-spacing
28%
padding
15%
space
JavaScript Task
Write a greet function that takes a name and prints the message "Hello, [name]!".
Difficulty: Easy ๐
Write a greet function that takes a name and prints the message "Hello, [name]!".
Difficulty: Easy ๐
greet("John");
greet("Alex");