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 天
帖子存档
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?
JavaScript Task
Check that this string consists of numbers only.
Difficulty: Easy😁
string = "1234567890"
What is the default value of the position property in CSS?
What will this code output? Spot the bug.
Difficulty: Hard😤
for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i);
}, 1000);
}Which method can be used to replace parts of a string in Python?
The task is to write a palindrome function.
Difficulty: Hard😤
isPalindrome("radar"); // true
isPalindrome("hello"); // false