91. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: [1, 2, 3, 4, 5]
0%
B: [1, 2, 3, 5]
0%
C: [1, 2, 3, 4]
0%
D: Error
92. What's the output?
function giveLydiaPizza() {
return 'Here is pizza!';
}
const giveLydiaChocolate = () =>
"Here's chocolate... now go hit the gym already.";
console.log(giveLydiaPizza.prototype);
console.log(giveLydiaChocolate.prototype);92. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: { constructor: ...} { constructor: ...}
0%
B: {} { constructor: ...}
0%
C: { constructor: ...} {}
0%
D: { constructor: ...} undefined
93. What's the output?
const person = {
name: 'Lydia',
age: 21,
};
for (const [x, y] of Object.entries(person)) {
console.log(x, y);
}93. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: name Lydia and age 21
0%
B: ["name", "Lydia"] and ["age", 21]
0%
C: ["name", "age"] and undefined
0%
D: Error
94. What's the output?
function getItems(fruitList, ...args, favoriteFruit) {
return [...fruitList, ...args, favoriteFruit]
}
getItems(["banana", "apple"], "pear", "orange")94. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: ["banana", "apple", "pear", "orange"]
0%
B: [["banana", "apple"], "pear", "orange"]
0%
C: ["banana", "apple", ["pear"], "orange"]
0%
D: SyntaxError
95. What's the output?
function nums(a, b) {
if (a > b) console.log('a is bigger');
else console.log('b is bigger');
return
a + b;
}
console.log(nums(4, 2));
console.log(nums(1, 2));95. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: a is bigger, 6 and b is bigger, 3
0%
B: a is bigger, undefined and b is bigger, undefined
0%
C: undefined and undefined
0%
D: SyntaxError
96. What's the output?
class Person {
constructor() {
this.name = 'Lydia';
}
}
Person = class AnotherPerson {
constructor() {
this.name = 'Sarah';
}
};
const member = new Person();
console.log(member.name);96. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "Lydia"
0%
B: "Sarah"
0%
C: Error: cannot redeclare Person
0%
D: SyntaxError
97. What's the output?
const info = {
[Symbol('a')]: 'b',
};
console.log(info);
console.log(Object.keys(info));97. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: {Symbol('a'): 'b'} and ["{Symbol('a')"]
0%
B: {} and []
0%
C: { a: "b" } and ["a"]
0%
D: {Symbol('a'): 'b'} and []
98. What's the output?
const getList = ([x, ...y]) => [x, y]
const getUser = user => { name: user.name, age: user.age }
const list = [1, 2, 3, 4]
const user = { name: "Lydia", age: 21 }
console.log(getList(list))
console.log(getUser(user))
98. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: [1, [2, 3, 4]] and SyntaxError
0%
B: [1, [2, 3, 4]] and { name: "Lydia", age: 21 }
0%
C: [1, 2, 3, 4] and { name: "Lydia", age: 21 }
0%
D: Error and { name: "Lydia", age: 21 }
99. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: SyntaxError
0%
B: ReferenceError
0%
C: TypeError
0%
D: undefined
100. What's the value of output?
// 🎉✨ This is my 100th question! ✨🎉
const output = `${[] && 'Im'}possible!
You should${'' && `n't`} see a therapist after so much JavaScript lol`;
100. What's the value of output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: possible! You should see a therapist after so much JavaScript lol
0%
B: Impossible! You should see a therapist after so much JavaScript lol
0%
C: possible! You shouldn't see a therapist after so much JavaScript lol
0%
D: Impossible! You shouldn't see a therapist after so much JavaScript lol
111. What's the output?
let name = 'Lydia';
function getName() {
console.log(name);
let name = 'Sarah';
}
getName();