Programming Quiz Channel
723 subscribers
81 photos
4 videos
1 file
Programming quizzes and knowledge tests

Short quizzes on programming, logic and computer science.

Test and improve your coding knowledge.
Join 👉 https://rebrand.ly/bigdatachannels

DMCA: @disclosure_bds
Contact: @mldatascientist
Download Telegram
Which CSS property is used to control the transparency of an element?
Anonymous Quiz
38%
transparent
33%
opacity
18%
visibility
11%
transparency
👍31🔥1
How can the code be modified to handle both successful and failed promises?
Difficulty: Impossible😈

const promises = [
Promise.resolve(1),
Promise.reject(new Error('Error'))
];

Promise.all(promises)
.then(results => console.log(results))
.catch(error => console.error(error));
Which CSS property is used to make text bold?
Anonymous Quiz
53%
font-weight
22%
text-weight
22%
bold
2%
font-style
Which HTML tag is used to create a horizontal line?
Anonymous Quiz
11%
<line>
73%
<hr>
11%
<horizontal>
4%
<b>
TEST
Write a calculator in JavaScript with minimal code
Difficulty: Easy🙂

function calculate(expression) {
try {
let result = eval(expression);
if (isNaN(result)) {
throw new Error("Invalid expression");
}
return result;
} catch (e) {
return "Error: " + e.message;
}
}

let userInput = prompt("Enter an arithmetic expression (for example, 2 + 2):");

if (userInput !== null) {
console.log("Result:", calculate(userInput));
}
How can you select all the elements with class "example" in CSS?
Anonymous Quiz
18%
*example
69%
.example
5%
example.example
Find the error in the code.
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😁

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😐

const data = [1, 2, 3, 4, 5];

function getEvenNumbers(arr) {
return arr.filter(num => num % 2 = 0);
}

console.log(getEvenNumbers(data));
👍42🔥2
What is the correct way to create a hyperlink in HTML?
Anonymous Quiz
14%
<link href="www.example.com">click</link>
71%
<a href="www.example.com">click</a>
2%
👍3🕊3🔥2🐳2