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;114. What will happen?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: The setInterval callback won't be invoked
0%
B: The setInterval callback gets invoked once
0%
C: The setInterval callback will still be called every second
0%
D: We never invoked config.alert(), config is null
115. Which method(s) will return the value 'Hello world!'?
const myMap = new Map();
const myFunc = () => 'greeting';
myMap.set(myFunc, 'Hello world!');
//1
myMap.get('greeting');
//2
myMap.get(myFunc);
//3
myMap.get(() => 'greeting');
115. Which method(s) will return the value 'Hello world!'?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 1
0%
B: 2
0%
C: 2 and 3
0%
D: All of them
116. What's the output?
const person = {
name: 'Lydia',
age: 21,
};
const changeAge = (x = { ...person }) => (x.age += 1);
const changeAgeAndName = (x = { ...person }) => {
x.age += 1;
x.name = 'Sarah';
};
changeAge(person);
changeAgeAndName();
console.log(person);116. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: {name: "Sarah", age: 22}
0%
B: {name: "Sarah", age: 23}
0%
C: {name: "Lydia", age: 22}
0%
D: {name: "Lydia", age: 23}