Daily JavaScript
15 subscribers
1 photo
1 link
Daily examples, coding challenges, and useful tips for developers.
Download Telegram
4. Which of the following is a data type?
Anonymous Quiz
0%
A) Loop
100%
B) Boolean
0%
C) Compiler
6. Which data is mutable in JavaScript?
Anonymous Quiz
33%
A) String
67%
B) Array
0%
C) Number
8. What does the forEach() method usually cause?
Anonymous Quiz
0%
A) A new array
100%
B) A mutation
0%
C) An error
what is difference?
1. What's the output?

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); }
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());
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';
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,
};
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:
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);
8. What's the output?

class Chameleon {
static colorChange(newColor) {
this.newColor = newColor;
return this.newColor;
}

constructor({ newColor = 'green' } = {}) {
this.newColor = newColor;
}
}

const freddie = new Chameleon({ newColor: 'purple' });
console.log(freddie.colorChange('orange'));
8. What's the output?

Javob variantlari:
Anonymous Quiz
0%
A: orange
0%
B: purple
0%
C: green
100%
D: TypeError