Coding Quiz Zone
الذهاب إلى القناة على Telegram
✨ Part Of @OfficialCodingExpert Dive into the world of computer science, programming, and coding challenges. Sharpen your skills, expand your knowledge, and embark on a journey of continuous learning. Stay tuned for daily quizzes!
إظهار المزيد1 547
المشتركون
+124 ساعات
-57 أيام
-530 أيام
أرشيف المشاركات
1 547
Quiz 10: The Spread Operator
Q10: What will be the output of the following code?
const arr1 = [1, 2]; const arr2 = [3, 4]; const arr3 = [...arr1, ...arr2]; console.log(arr3);
1 547
Quiz 9: Arrow Functions
Q9: What will the output of the following code be?
const sum = (a, b) => a + b; console.log(sum(2, 3));
1 547
Quiz 8: Object Destructuring
Q8: What is the output of the following code?
const obj = { a: 1, b: 2, c: 3 }; const { a, b } = obj; console.log(a, b);
1 547
Quiz 7: What will be logged to the console when the following code executes?
javascript
function greet() { console.log(this.message); } const obj = { message: "Hello, world!" }; const greetObj = greet.bind(obj); greetObj(); // ?
1 547
Quiz 6: Prototypes
Q6: What will be the output of the following code?
function Person() {} Person.prototype.sayHello = function() { console.log("Hello"); }; const john = new Person(); john.sayHello(); // ?
1 547
Quiz 5: this keyword
Q5: In which of the following scenarios will this refer to the global object (or undefined in strict mode)?
1 547
Quiz 4: async/await
Q4: What will the following code output?
async function foo() { return 1; } foo().then(console.log);
1 547
Quiz 3: Event Delegation
Q3: Which of the following is true about event delegation?
1 547
Quiz 2: Promises
Q2: What will be logged to the console when running the following code?
const promise = new Promise((resolve, reject) => {
resolve(1);
});
promise.then(result => {
console.log(result);
return result + 1;
}).then((result) => {
console.log(result);
});1 547
Quiz 1: Closures
Q1: What does the following code output?
function outer() { let count = 0; return function inner() { count++; return count; } } const counter = outer(); console.log(counter()); // ?
1 547
What will be logged to the console when running the following code?
javascript
const promise = new Promise((resolve, reject) => { resolve(1);}); promise.then(result => {console.log(result); return result + 1;}).then((result) =>{console.log(result);});
1 547
Code 1
function outer() {
let count = 0;
return function inner() {
count++;
return count;
}
}
const counter = outer();
console.log(counter()); // ?
Using above code solve the questions1 547
Quiz 1: Closures
Q1: What does the following code output?
function outer() { let count = 0; return function inner() { count++; return count; } } const counter = outer(); console.log(counter()); // ?
1 547
Riddle of the Week 🧩💻:
I can be silent, but I always speak, Through numbers 🔢 and symbols 🔣, I’m quite unique. I hold great power ⚡, yet I’m rarely seen, In loops 🔄 and conditions ❓, I reign supreme. I’m the key to logic 🧠, control, and flow 🌊, But tell me, what am I? Do you know? 🤔What do you think the answer is ? (Please avoid AI tools, try to solve with your own)
1 547
#include <stdio.h> int main() { int i = 3; int l = i / -2; int k = i % -2; printf("%d %d\n", l, k); return 0; }
1 547
What will be the output of the following C code?
#include int main() { int i = -3; int k = i % 2; printf("%d\n", k); }
