Hello Frontend Team,
Join this discussion group and feel free to ask any doubts or any ' how to do in frontend ' related queries so that I can help 🙂🫡✌️
https://t.me/+I5O_KN1SZJM4YWNl
Join this discussion group and feel free to ask any doubts or any ' how to do in frontend ' related queries so that I can help 🙂🫡✌️
https://t.me/+I5O_KN1SZJM4YWNl
🥰3
What will be the ouptut of this function?
function sayHi() {
console.log(name);
console.log(age);
var name = 'Lydia';
let age = 21;
}
sayHi();
function sayHi() {
console.log(name);
console.log(age);
var name = 'Lydia';
let age = 21;
}
sayHi();
👍3
A: Lydia and undefined
B: Lydia and ReferenceError
C: ReferenceError and 21
D: undefined and ReferenceError
B: Lydia and ReferenceError
C: ReferenceError and 21
D: undefined and ReferenceError
👍3
// 2. Problem Solving
What will be the output ?
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1);
}
for (let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1);
}
A: 0 1 2 and 0 1 2
B: 0 1 2 and 3 3 3
C: 3 3 3 and 0 1 2
Explained Answer will be posted Tomorrow EOD ✌️
What will be the output ?
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1);
}
for (let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1);
}
A: 0 1 2 and 0 1 2
B: 0 1 2 and 3 3 3
C: 3 3 3 and 0 1 2
Explained Answer will be posted Tomorrow EOD ✌️
🔥1
