What does HTML <br> tag represent?
Anonymous Quiz
63%
Line break
7%
Bold text
25%
Break text
5%
Background row
Find the error in the code.
Difficulty: Easy😁
Difficulty: Easy😁
function greet(name) {
console.log("Hello, " + name);
}
greet();Which statement is used to execute a function in JavaScript?
Anonymous Quiz
18%
run
47%
function
7%
execute
29%
call
Which of the following is NOT a valid JavaScript variable name?
Anonymous Quiz
9%
myVariable
53%
2ndVariable
29%
$variable
9%
_variable
Find the error in the code.
Difficulty: Average😐
Difficulty: Average😐
const data = [1, 2, 3, 4, 5];
function getEvenNumbers(arr) {
return arr.filter(num => num % 2 = 0);
}
console.log(getEvenNumbers(data));
👍4❤2🔥2
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();