Questions About JavaScript Flashcards

1
Q

Explain event delegation.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain how prototypal inheritance works.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What’s the difference between a variable that is: null, undefined or undeclared? How would you go about checking for any of these states?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a closure, and how/why would you use one?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What language constructions do you use for iterating over object properties and array items?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can you describe the main difference between the Array.forEach() loop and Array.map() methods and why you would pick one versus the other?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s a typical use case for anonymous functions?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What’s the difference between host objects and native objects?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the difference between: function Person(){}, var person = Person(), and var person = new Person()?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain the differences on the usage of foo between function foo() {} and var foo = function() {}

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you explain what Function.call and Function.apply do? What’s the notable difference between the two?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain Function.prototype.bind.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s the difference between feature detection, feature inference, and using the UA string?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain “hoisting”.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe event bubbling.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe event capturing.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What’s the difference between an “attribute” and a “property”?

A
18
Q

What are the pros and cons of extending built-in JavaScript objects?

A
19
Q

What is the difference between == and ===?

A
20
Q

Explain the same-origin policy with regards to JavaScript.

A
21
Q

Why is it called a Ternary operator, what does the word “Ternary” indicate?

A
22
Q

What is strict mode? What are some of the advantages/disadvantages of using it?

A
23
Q

What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?

A
24
Q

What tools and techniques do you use debugging JavaScript code?

A
25
Q

Explain the difference between mutable and immutable objects.
What is an example of an immutable object in JavaScript?
What are the pros and cons of immutability?
How can you achieve immutability in your own code?

A
26
Q

Explain the difference between synchronous and asynchronous functions.

A
27
Q

What is an event loop?

A
28
Q

What is the difference between call stack and task queue?

A
29
Q

What are the differences between variables created using let, var or const?

A
30
Q

What are the differences between ES6 class and ES5 function constructors?

A
31
Q

Can you offer a use case for the new arrow => function syntax? How does this new syntax differ from other functions?

A
32
Q

What advantage is there for using the arrow syntax for a method in a constructor?

A
33
Q

What is the definition of a higher-order function?

A
34
Q

Can you give an example for destructuring an object or an array?

A
35
Q

Can you give an example of generating a string with ES6 Template Literals?

A
36
Q

Can you give an example of a curry function and why this syntax offers an advantage?

A
37
Q

What are the benefits of using spread syntax and how is it different from rest syntax?

A
38
Q

How can you share code between files?

A
39
Q

Why might you want to create static class members?

A
40
Q

What is the difference between while and do-while loops in JavaScript?

A