1. What does the JavaScript engine do?
Anonymous Quiz
33%
A) It designs web pages
67%
B) It reads and executes the code
0%
C) It stores data
2. What happens if the syntax of a program is wrong?
Anonymous Quiz
0%
A) The program runs faster
100%
B) The compiler or browser shows an error
0%
C) The function becomes immutable
3. What is a variable used for?
Anonymous Quiz
100%
A) To store data
0%
B) To display text on a page
0%
C) To change the syntax
5. What does immutable mean?
Anonymous Quiz
0%
A) Something that can be changed
100%
B) Something that cannot be changed
0%
C) Something that runs automatically
7. What does the map() method do?
Anonymous Quiz
33%
A) It changes the original array
67%
B) It creates a new array
0%
C) It deletes data
8. What does the forEach() method usually cause?
Anonymous Quiz
0%
A) A new array
100%
B) A mutation
0%
C) An error
9. What is assignment in programming?
Anonymous Quiz
67%
A) Giving a value to a variable
33%
B) Changing a loop
0%
C) Deleting a function
10. What is the main difference between map() and forEach()?
Anonymous Quiz
100%
A) map creates a new array, forEach doesn’t
0%
B) forEach runs faster than map
0%
C) map deletes the array
1. What's the output?
function sayHi() { console.log(name); console.log(age); var name = 'Lydia'; let age = 21; } sayHi();
function sayHi() { console.log(name); console.log(age); var name = 'Lydia'; let age = 21; } sayHi();
Anonymous Quiz
0%
A: Lydia and undefined
0%
B: Lydia and ReferenceError
0%
C: ReferenceError and 21
100%
D: undefined and ReferenceError
2. What's the output?
for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1); } for (let i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1); }
for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1); } for (let i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1); }
Anonymous Quiz
50%
A: 0 1 2 and 0 1 2
0%
B: 0 1 2 and 3 3 3
50%
C: 3 3 3 and 0 1 2
3. What's the output?
const shape = { radius: 10, diameter() { return this.radius * 2; }, perimeter: () => 2 * Math.PI * this.radius, }; console.log(shape.diameter()); console.log(shape.perimeter());
const shape = { radius: 10, diameter() { return this.radius * 2; }, perimeter: () => 2 * Math.PI * this.radius, }; console.log(shape.diameter()); console.log(shape.perimeter());
Anonymous Quiz
50%
A: 20 and 62.83185307179586
50%
B: 20 and NaN
0%
C: 20 and 63
0%
D: NaN and 63
4. What's the output?
+true; !'Lydia';
+true; !'Lydia';
Anonymous Quiz
100%
A: 1 and false
0%
B: false and NaN
0%
C: false and false
5. Which one is true?
const bird = {
size: 'small',
};
const mouse = {
name: 'Mickey',
small: true,
};5. Which one is true?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
100%
A: mouse.bird.size is not valid
0%
B: mouse[bird.size] is not valid
0%
C: mouse[bird["size"]] is not valid
0%
C: mouse[bird["size"]] is not valid
6. What's the output?
let c = { greeting: 'Hey!' };
let d;
d = c;
c.greeting = 'Hello';
console.log(d.greeting);6. What's the output?
Javob variantlari:
Javob variantlari:
Anonymous Quiz
100%
A: Hello
0%
B: Hey!
0%
C: undefined
0%
D: ReferenceError
0%
E: TypeError
7. What's the output?
let a = 3;
let b = new Number(3);
let c = 3;
console.log(a == b);
console.log(a === b);
console.log(b === c);