What is Redux in the context of React?
Anonymous Quiz
13%
A routing library
18%
A rendering library
59%
A state management library
10%
A data fetching library
๐ฅฑ2
Find the error in the code.
Difficulty: Average๐คจ
Difficulty: Average๐คจ
const numbers = [1, 2, 3, 4, 5];
const doubleNumbers = numbers.map(function(num) {
num *= 2;
});
console.log(doubleNumbers);
What does the typeof operator return for an array?
Anonymous Quiz
9%
list
34%
object
23%
array
33%
array-object
๐2
Which property would you use to animate a change from one set of CSS properties to another?
Anonymous Quiz
25%
transform
30%
keyframes
25%
animation
20%
transition
What will this code output to the console and why?
Difficulty: Hard๐ค
Difficulty: Hard๐ค
function addToArray(arr, value) {
arr.push(value);
return arr;
}
const numbers = [1, 2, 3];
const result = addToArray(numbers, 4);
console.log(result);
console.log(numbers);What is the purpose of the <!DOCTYPE html> declaration?
Anonymous Quiz
19%
To define the encoding of the document
69%
To specify the document type and version of HTML
6%
To include external JavaScript files
5%
To specify the base URL for relative links
๐2
How do you create a comment in a CSS file?
Anonymous Quiz
38%
<!-- This is a comment -->
13%
// This is a comment
43%
/* This is a comment */
6%
# This is a comment
โค5๐3๐ฅ1๐1
What will this code output to the console and why?
Difficulty: Average๐คจ
Difficulty: Average๐คจ
function createAccumulator(initialValue) {
let total = initialValue;
return function(amount) {
total += amount;
return total;
};
}
const accumulator = createAccumulator(10);
console.log(accumulator(5));
console.log(accumulator(10));
console.log(accumulator(-5));
const anotherAccumulator = createAccumulator(100);
console.log(anotherAccumulator(50));๐3โค2๐ค1
Which of the following is true about let and var in JavaScript?
Anonymous Quiz
15%
var is block-scoped, while let is function-scoped
28%
let is function-scoped, while var is block-scoped
20%
Both let and var are block-scoped
37%
let is block-scoped, while var is function-scoped
JavaScript Task
Write a function findMax(arr) that takes an array of numbers and returns the largest number in the array.
Difficulty: Easy๐
Write a function findMax(arr) that takes an array of numbers and returns the largest number in the array.
Difficulty: Easy๐
function findMax(arr) {
}
console.log(findMax([3, 5, 7, 2, 8]));How can you apply different styles to a child element when hovering over its parent in CSS?
Anonymous Quiz
44%
parent:hover child { /* styles */ }
17%
parent + hover child { /* styles */ }
27%
child:hover { /* styles */ }
12%
parent > hover child { /* styles */ }
Find the error in the code.
Difficulty: Average๐คจ
Difficulty: Average๐คจ
let numbers = [1, 2, 3, 4, 5];
function sumArray(arr) {
return arr.reduce((accumulator, current) => {
return accumulator + current;
}, 0);
}
console.log('Sum:', sumArray(numbers));
numbers = '1, 2, 3, 4, 5';
console.log('Sum:', sumArray(numbers));
How do you create a multi-line text input field in HTML?
Anonymous Quiz
5%
Using <multiline>
41%
Using <textarea>
24%
Using <input type="multiline">
30%
Using <input type="textarea">
JavaScript Task
Write a function isEven that takes a number as an argument and returns true if the number is even and false if it is odd.
Difficulty: Easy๐
Write a function isEven that takes a number as an argument and returns true if the number is even and false if it is odd.
Difficulty: Easy๐
function isEven(num) {
}
console.log(isEven(4));
console.log(isEven(7));
console.log(isEven(0));
console.log(isEven(-2));๐2
Which CSS property is used to add rounded corners to an element?
Anonymous Quiz
6%
corner-radius
12%
border-corner
78%
border-radius
4%
border-style
๐1๐ฅ1๐1
What does the placeholder attribute do in an <input> field?
Anonymous Quiz
11%
Defines the maximum length of the input
21%
Specifies the data type for the input
23%
Sets a default value for the input
46%
Provides a hint or example of the expected value
Find the error in the code.
Difficulty: Average๐คจ
Difficulty: Average๐คจ
function processData(data) {
let result = data.map(item => item.value);
return result;
}
let inputData = null;
console.log(processData(inputData));How can you check if a variable is an array in JavaScript?
Anonymous Quiz
32%
Array.isArray(variable)
32%
typeof variable === 'array'
34%
variable.isArray()
2%
variable instanceof Array
๐3
JavaScript Task
Remove all empty strings from the array.
Difficulty: Average๐คจ
Remove all empty strings from the array.
Difficulty: Average๐คจ
let arr = [1, '', 2, 3, '', 5];