Programming Quiz Channel
Open in Telegram
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
Show more803
Subscribers
No data24 hours
+37 days
+1230 days
Posts Archive
Find the error in the code.
Difficulty: Hardπ€
function processArray(arr) {
let result = [];
arr.forEach(item => {
if (item != '') {
result.push(item);
} else if (typeof item === 'number') {
result.push(item * 2);
}
});
return result;
}
let data = [1, '', 2, 3, '', 5, null, undefined, 'hello'];
console.log(processArray(data));Which HTML tag is used to define an internal style sheet?
Event delegation in Javascript!!
Commonly used for handling clicks on dynamically added elements, managing events for a large number of similar elements efficiently, and simplifying event management in complex user interfaces.
Find the error in the code.
Difficulty: Easyπ
number = 5
text = "Quantity: " + number
print(text)What is the correct syntax for referring to an external script called "xxx.js"?
Which CSS rule can be used to change the cursor when hovering over an element?
What will this code output?
Difficulty: Averageπ€¨
const obj1 = { name: 'Alice' };
const obj2 = { name: 'Alice' };
if (obj1 === obj2) {
console.log("true");
} else {
console.log("false");
}What is a correct syntax to output "Hello World" in Python?
Find the error in the code.
The answer should be: 15
Difficulty: Averageπ
function sumArray(arr) {
let sum = 0;
arr.forEach(function(num) {
sum =+ num;
});
return sum;
}
let numbers = [1, 2, 3, 4, 5];
console.log(sumArray(numbers));