What is the main difference between the "==" and "===" operators in JavaScript?
Anonymous Quiz
36%
The "===" operator compares values without considering data types, while "==" compares both.
58%
The "==" operator compares values without considering data types, while "===" compares both.
0%
Both operators compare only the value of variables.
6%
Both operators compare only the data type of variables.
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();🤔2
Which property is used to change the text color in CSS?
Anonymous Quiz
15%
text-color
17%
font-color
63%
color
4%
text-style
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