126. What's the output?
function getFine(speed, amount) {
const formattedSpeed = new Intl.NumberFormat('en-US', {
style: 'unit',
unit: 'mile-per-hour'
}).format(speed);
const formattedAmount = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD'
}).format(amount);
return `The driver drove ${formattedSpeed} and has to pay ${formattedAmount}`;
}
console.log(getFine(130, 300))126. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: The driver drove 130 and has to pay 300
0%
B: The driver drove 130 mph and has to pay $300.00
0%
C: The driver drove undefined and has to pay undefined
0%
D: The driver drove 130.00 and has to pay 300.00
127. What's the output?
const spookyItems = ['👻', '🎃', '🕸'];
({ item: spookyItems[3] } = { item: '💀' });
console.log(spookyItems);
127. What's the output?
Javob variantlari;
Javob variantlari;
Anonymous Quiz
0%
A: ["👻", "🎃", "🕸"]
0%
B: ["👻", "🎃", "🕸", "💀"]
0%
C: ["👻", "🎃", "🕸", { item: "💀" }]
0%
D: ["👻", "🎃", "🕸", "[object Object]"]
128. What's the output?
const name = 'Lydia Hallie';
const age = 21;
console.log(Number.isNaN(name));
console.log(Number.isNaN(age));
console.log(isNaN(name));
console.log(isNaN(age));
128. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: true false true false
0%
B: true false false false
0%
C: false false true false
0%
D: false true false true
129. What's the output?
const randomValue = 21;
function getInfo() {
console.log(typeof randomValue);
const randomValue = 'Lydia Hallie';
}
getInfo();
129. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "number"
0%
B: "string"
0%
C: undefined
100%
D: ReferenceError
130. What's the output?
const myPromise = Promise.resolve('Woah some cool data');
(async () => {
try {
console.log(await myPromise);
} catch {
throw new Error(`Oops didn't work`);
} finally {
console.log('Oh finally!');
}
})();130. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: Woah some cool data
67%
B: Oh finally!
33%
C: Woah some cool data Oh finally!
0%
D: Oops didn't work Oh finally!