Javascript Final Flashcards

1
Q

What does ECMA stand for?

A

European Computer Manufacturer’s Association

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

What is ECMA?

A

ECMA is a trademarked scripting-language specification standardized by ECMA international

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

What is ECMA used for?

A

For client-side scripting and for writing server applications and services using Node.js

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

What is a Shim?

A

A software add-in that provides full support for a particular software standard

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

What are some examples of ECMAScript?

A

The “use strict” directive, for example String.trim(), Array.isArray(), Array.indexOf(), JSON.parse(), JSON.stringify(), property getters and setters and new object property methods

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

What is a part of ECMA6?

A

Support for constants, Block Scope, Arrow Functions, Template literals, Modules, Classes, Promises etc…

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

What are sets (set collections)?

A

Ordered lists of values that contain no duplicates. Accessed using keys

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

What are maps?

A

the map object holds key-value pairs. Any value (both objects and primitive
values) may be used as either a key or a
value

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

What are classes?

A

provides syntactical sugar. They offer a cleaner and more elegant syntax.

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

Getters and setters

A

Properties are nouns, methods are verbs

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

Inheritance

A

Concepts at higher levels are more general, concepts at lower levels are more specific(inherit properties of concepts at higher levels)

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

Arrow Functions

A

Shorter way of creating simple functions, called lambdas in other languages.

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

Are arrow functions named?

A

Arrow functions are not named, they can be assigned to a variable but are always anonymous

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

Arrow function syntax

A

has a set of parentheses that will hold all the parameters like a function expression, next is the arrow =>, then the curly braces {} that will have the body of the function inside. Parentheses are optional only when one parameter is being passed. if no parameters are being passed, parentheses are required

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

Example for a function

A

function literal (declaration)
function add1(a, b) {
return a + b;
}

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

Example for function expression

A

let add2 = function (a, b) {
return a + b;
};

17
Q

Example for arrow function

A

let add3 = (a, b) => {return a + b;}

18
Q

Invocation of functions

A

Invoking a function suspends the execution of the current function, passing control and parameters to the new function. When the function is finished, it returns to the line following where it was invoked. It remembers where to return to because this information is stored on the stack prior to the function being invoked

19
Q

Return

A

the return statement can be used to cause the function to return early. A function always returns a value. If the value is not specified then undefined is returned

20
Q

Scope

A

controls the visibility and lifetimes of variables and parameters

21
Q

Scope variables

A

Variables and objects that are currently referenced are known as “alive”, deleted or moved out of scope or method finishes are de-referenced (no longer alive)

22
Q

Closure

A

the local variables for a function - kept alive after the function has returned

23
Q

Closure(cont)

A

Whenever you use a function inside another function, a closure is created. A closure in js is like keeping a copy of all the local variables, just as they were when a function exited

24
Q

What is Node.js

A

A platform for executing JavaScript base on non-blocking I/O. Uses an event driven model that enables fast scalable network applications

25
Q

Node.js(cont)

A

its a sever-side javascript for network applications. Supports modular JavaScript, utilizes non-blocking(asynchronous) code

26
Q

Node.js important info

A

Node.js is asynchronous by nature

27
Q
A