63. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
100%
A: 10, 10
0%
B: 10, 11
0%
C: 11, 11
0%
D: 11, 12
64. What's the output?
const value = { number: 10 };
const multiply = (x = { ...value }) => {
console.log((x.number *= 2));
};
multiply();
multiply();
multiply(value);
multiply(value);64. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 20, 40, 80, 160
0%
B: 20, 40, 20, 40
100%
C: 20, 20, 20, 40
0%
D: NaN, NaN, 20, 40
65. What's the output?
[1, 2, 3, 4].reduce((x, y) => console.log(x, y));
[1, 2, 3, 4].reduce((x, y) => console.log(x, y));
Anonymous Quiz
0%
A: 1 2 and 3 3 and 6 4
0%
B: 1 2 and 2 3 and 3 4
0%
C: 1 undefined and 2 undefined and 3 undefined and 4 undefined
100%
D: 1 2 and undefined 3 and undefined 4
66. With which constructor can we successfully extend the Dog class?
class Dog {
constructor(name) {
this.name = name;
}
};
class Labrador extends Dog {
// 1
constructor(name, size) {
this.size = size;
}
// 2
constructor(name, size) {
super(name);
this.size = size;
}
// 3
constructor(size) {
super(name);
this.size = size;
}
// 4
constructor(name, size) {
this.name = name;
this.size = size;
}
};66. With which constructor can we successfully extend the Dog class?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 1
100%
B: 2
0%
C: 3
0%
D: 4
67. What's the output?
// index.js
console.log('running index.js');
import { sum } from './sum.js';
console.log(sum(1, 2));
// sum.js
console.log('running sum.js');
export const sum = (a, b) => a + b;
67. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: running index.js, running sum.js, 3
100%
B: running sum.js, running index.js, 3
0%
C: running sum.js, 3, running index.js
0%
D: running index.js, undefined, running sum.js
68. What's the output?
console.log(Number(2) === Number(2));
console.log(Boolean(false) === Boolean(false));
console.log(Symbol('foo') === Symbol('foo'));
68. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
100%
A: true, true, false
0%
B: false, true, false
0%
C: true, false, true
0%
D: true, true, true
69. What's the output?
const name = 'Lydia Hallie';
console.log(name.padStart(13));
console.log(name.padStart(2));
69. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "Lydia Hallie", "Lydia Hallie"
0%
B: " Lydia Hallie", " Lydia Hallie" ("[13x whitespace]Lydia Hallie", "[2x whitespace]Lydia Hallie")
100%
C: " Lydia Hallie", "Lydia Hallie" ("[1x whitespace]Lydia Hallie", "Lydia Hallie")
0%
D: "Lydia Hallie", "Lyd",
70. What's the output?
console.log('🥑' + '💻');
console.log('🥑' + '💻');
Anonymous Quiz
50%
A: "🥑💻"
0%
B: 257548
50%
C: A string containing their code points
0%
D: Error
71. How can we log the values that are commented out after the console.log statement?
function* startGame() {
const answer = yield 'Do you love JavaScript?';
if (answer !== 'Yes') {
return "Oh wow... Guess we're done here";
}
return 'JavaScript loves you back ❤️';
}
const game = startGame();
console.log(/* 1 */); // Do you love JavaScript?
console.log(/* 2 */); // JavaScript loves you back ❤️71. How can we log the values that are commented out after the console.log statement?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
B: game.next.value("Yes") and game.next.value()
0%
D: game.next.value() and game.next.value("Yes")
72. What's the output?
console.log(String.raw`Hello\nworld`); ⬇️ - bu belgi pastki qatorda degani
console.log(String.raw`Hello\nworld`); ⬇️ - bu belgi pastki qatorda degani
Anonymous Quiz
0%
A: Hello world!
0%
B: Hello⬇️ world
100%
C: Hello\nworld
0%
D: Hello\n⬇️ world
73. What's the output?
async function getData() {
return await Promise.resolve('I made it!');
}
const data = getData();
console.log(data);73. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "I made it!"
0%
B: Promise {<resolved>: "I made it!"}
100%
C: Promise {<pending>}
0%
D: undefined
74. What's the output?
function addToList(item, list) {
return list.push(item);
}
const result = addToList('apple', ['banana']);
console.log(result);74. What's the output?
Javob variantlari;
Javob variantlari;
Anonymous Quiz
0%
A: ['apple', 'banana']
50%
B: 2
0%
C: true
50%
D: undefined