16. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 1 1 2
0%
B: 1 2 2
100%
C: 0 2 2
0%
D: 0 1 2
17. What's the output?
function getPersonInfo(one, two, three) {
console.log(one);
console.log(two);
console.log(three);
}
const person = 'Lydia';
const age = 21;
getPersonInfo`${person} is ${age} years old`;17. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "Lydia" 21 ["", " is ", " years old"]
100%
B: ["", " is ", " years old"] "Lydia" 21
0%
C: "Lydia" ["", " is ", " years old"] 21
18. What's the output?
function checkAge(data) {
if (data === { age: 18 }) {
console.log('You are an adult!');
} else if (data == { age: 18 }) {
console.log('You are still an adult.');
} else {
console.log(`Hmm.. You don't have an age I guess`);
}
}
checkAge({ age: 18 });18. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: You are an adult!
0%
B: You are still an adult.
100%
C: Hmm.. You don't have an age I guess
19. What's the output?
function getAge(...args) {
console.log(typeof args);
}
getAge(21);19. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: "number"
0%
B: "array"
100%
C: "object"
0%
D: "NaN"
20. What's the output?
function getAge() {
'use strict';
age = 21;
console.log(age);
}
getAge();20. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 21
0%
B: undefined
100%
C: ReferenceError
0%
D: TypeError
21. What's the value of sum?
const sum = eval('10*10+5');
const sum = eval('10*10+5');
Anonymous Quiz
100%
A: 105
0%
B: "105"
0%
C: TypeError
0%
D: "10*10+5"
22. How long is cool_secret accessible?
sessionStorage.setItem('cool_secret', 123);
sessionStorage.setItem('cool_secret', 123);
Anonymous Quiz
0%
A: Forever, the data doesn't get lost.
100%
B: When the user closes the tab.
0%
C: When the user closes the entire browser, not only the tab.
0%
D: When the user shuts off their computer.
23. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 8
100%
B: 10
0%
C: SyntaxError
0%
D: ReferenceError
24. What's the output?
const obj = { 1: 'a', 2: 'b', 3: 'c' };
const set = new Set([1, 2, 3, 4, 5]);
obj.hasOwnProperty('1');
obj.hasOwnProperty(1);
set.has('1');
set.has(1);24. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: false true false true
0%
B: false true true true
100%
C: true true false true
0%
D: true true true true
25. What's the output?
const obj = { a: 'one', b: 'two', a: 'three' };
console.log(obj);25. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: { a: "one", b: "two" }
0%
B: { b: "two", a: "three" }
100%
C: { a: "three", b: "two" }
0%
D: SyntaxError
26. The JavaScript global execution context creates two things for you: the global object, and the "this" keyword.
Javob variantlari:
Javob variantlari:
Anonymous Quiz
100%
A: true
0%
B: false
0%
C: it depends
27. What's the output?
for (let i = 1; i < 5; i++) {
if (i === 3) continue;
console.log(i);
}27. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
0%
A: 1 2
0%
B: 1 2 3
100%
C: 1 2 4
0%
D: 1 3 4