Which CSS property is used to create space between elements on a page?
Anonymous Quiz
47%
margin
12%
border-spacing
25%
padding
16%
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");Which HTML element is used to define a navigation section?
Anonymous Quiz
10%
<n>
8%
<navigate>
10%
<section>
72%
<nav>
❤3🔥2👍1
What will this code output?
Difficulty: Average🤨
Difficulty: Average🤨
const obj1 = { name: 'Alice' };
const obj2 = { name: 'Alice' };
if (obj1 === obj2) {
console.log("true");
} else {
console.log("false");
}👍2
What is Redux in the context of React?
Anonymous Quiz
14%
A routing library
16%
A rendering library
59%
A state management library
11%
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
10%
list
34%
object
24%
array
32%
array-object
👍2
Which property would you use to animate a change from one set of CSS properties to another?
Anonymous Quiz
25%
transform
31%
keyframes
24%
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
39%
<!-- This is a comment -->
12%
// 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
16%
var is block-scoped, while let is function-scoped
27%
let is function-scoped, while var is block-scoped
20%
Both let and var are block-scoped
38%
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
45%
parent:hover child { /* styles */ }
17%
parent + hover child { /* styles */ }
26%
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>
42%
Using <textarea>
22%
Using <input type="multiline">
31%
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