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();
111. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: Lydia
0%
B: Sarah
0%
C: undefined
0%
D: ReferenceError
112. What's the output?
function* generatorOne() {
yield ['a', 'b', 'c'];
}
function* generatorTwo() {
yield* ['a', 'b', 'c'];
}
const one = generatorOne();
const two = generatorTwo();
console.log(one.next().value);
console.log(two.next().value);112. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: a and a
0%
B: a and undefined
0%
C: ['a', 'b', 'c'] and a
0%
D: a and ['a', 'b', 'c']
113. What's the output?
console.log(`${(x => x)('I love')} to program`);
console.log(`${(x => x)('I love')} to program`);
Anonymous Quiz
0%
A: I love to program
0%
B: undefined to program
0%
C: ${(x => x)('I love') to program
0%
D: TypeError
114. What will happen?
let config = {
alert: setInterval(() => {
console.log('Alert!');
}, 1000),
};
config = null;