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
نمایش بیشتر780
مشترکین
-124 ساعت
+27 روز
+1830 روز
آرشیو پست ها
What will this code output? Spot the bug.
Difficulty: Hard😤
for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i);
}, 1000);
}+5
Spread Operator in Depth
Ecmascript 2015 or ES6 is the sixth major edition of Ecmascript language specification standard. It bought significant changes to Javascript language.
Which of the following creates a true copy of the object obj in JavaScript?
What will this code output? Spot the bug.
Difficulty: Hard😤
for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i);
}, 1000);
}for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i);
}, 1000);
}
Which property is used to create space inside an element between its content and its border?
Find the error in the code.
Difficulty: Easy😁
function add(a, b) {
return a + b;
}
const result = add(5);
console.log(result);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));Inline elements in HTML are typically displayed without starting a new line.
📝 CSS display: contents
How can display: contents improve layout flexibility? This property makes elements "transparent" in the DOM, merging their children with the parent container without altering visual display. It helps eliminate unnecessary wrappers and simplifies styling, but be aware of accessibility issues with screen readers.
How can you check if a value is NOT equal to 5 in JavaScript?
