Let's DECODE the Secrets to CyberSecurity and BugBounty Hunting! WebWonders, is your go-to destination for all things secure web development


WebWonders

Quiz 13: Multiple Declarations
Question: Which statement causes an error?


var x = 1;
var x = 2;
let y = 3;
let y = 4;

11 hours ago | [YT] | 0

WebWonders

Quiz 12: const in Loop
Question: Which loop works with const?

// Which works?

1 day ago | [YT] | 0

WebWonders

Quiz 11: var in Loop
Question: What's the final value of i?

for (var i = 0; i < 5; i++) {
// loop runs
}
console.log(i);

2 days ago | [YT] | 0

WebWonders

Quiz 9: Variable Hoisting
Question: What is the output?


console.log(age);
var age = 25;
let year = 2024;

3 days ago | [YT] | 0

WebWonders

Quiz 8: const with Objects

Question: What happens when we run this code?

const user = { name: "Alice" };
user = { name: "Bob" };
console.log(user.name);

5 days ago | [YT] | 0

WebWonders

Quiz 7: Hoisting Differences


Question: What is logged?



console.log(typeof a);
console.log(typeof b);
var a = 1;
let b = 2;

6 days ago | [YT] | 0

WebWonders

Quiz 6: Global Scope Pollution


Question: What's the difference between these declarations in global scope?
var a = 1;
let b = 2;

1 week ago | [YT] | 0

WebWonders

Quiz 5: Variable Redeclaration

Question: Which declaration allows redeclaration in the same scope?



// Example context
var x = 1;
var x = 2;

1 week ago | [YT] | 0

WebWonders

Quiz 4: Block Scoping
Question: What does this code output?


for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}

1 week ago | [YT] | 1

WebWonders

Quiz 3: Temporal Dead Zone

Question: What is the output?



console.log(a);

let a = 10;

1 week ago | [YT] | 1