JS Flashcards

1
Q

Explain event delegation

A

a

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

Explain how this works in JavaScript

A

a

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

Explain how prototypal inheritance works

A

a

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

What do you think of AMD vs CommonJS?

A

a

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

Explain why the following doesn’t work as an IIFE: function foo(){ }();.
What needs to be changed to properly make it an IIFE?

A

a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
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

a

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

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

A

a

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

What’s a typical use case for anonymous functions?

A

a

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

How do you organize your code? (module pattern, classical inheritance?)

A

a

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

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

A

a

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

Difference between: function Person(){}, var person = Person(), and var person = new Person()?

A

a

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

What’s the difference between .call and .apply?

A

a

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

What’s the difference between .call and .apply?

A

a

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

When would you use document.write()?

A

a

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

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

A

a

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

Explain Ajax in as much detail as possible.

A

a

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

What are the advantages and disadvantages of using Ajax?

A

a

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

Explain how JSONP works (and how it’s not really Ajax).

19
Q

Have you ever used JavaScript templating?

20
Q

Explain “hoisting”.

21
Q

Describe event bubbling.

22
Q

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

23
Q

Why is extending built-in JavaScript objects not a good idea?

24
Q

Difference between document load event and document DOMContentLoaded event?

25
What is the difference between == and ===?
a
26
Explain the same-origin policy with regards to JavaScript.
a
27
Why is it called a Ternary expression, what does the word "Ternary" indicate?
a
28
What is "use strict";? what are the advantages and disadvantages to using it?
a
29
Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?
a
30
Why would you use something like the load event? Does this event have disadvantages? Do you know any alternatives, and why would you use those?
a
31
Explain what a single page app is and how to make one SEO-friendly.
a
32
What is the extent of your experience with Promises and/or their polyfills?
a
33
What are the pros and cons of using Promises instead of callbacks?
a
34
What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?
a
35
What tools and techniques do you use debugging JavaScript code?
a
36
What language constructions do you use for iterating over object properties and array items?
a
37
Explain the difference between mutable and immutable objects.
a
38
What is an example of an immutable object in JavaScript?
a
39
What are the pros and cons of immutability?
a
40
How can you achieve immutability in your own code?
a
41
Explain the difference between synchronous and asynchronous functions.
a
42
What is event loop?
a
43
What is the difference between call stack and task queue?
a
44
Explain the differences on the usage of foo between function foo() {} and var foo = function() {}
a