Programming Quiz Channel
الذهاب إلى القناة على 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
إظهار المزيد803
المشتركون
لا توجد بيانات24 ساعات
+37 أيام
+1230 أيام
أرشيف المشاركات
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));