Javascript Final Flashcards
What does ECMA stand for?
European Computer Manufacturer’s Association
What is ECMA?
ECMA is a trademarked scripting-language specification standardized by ECMA international
What is ECMA used for?
For client-side scripting and for writing server applications and services using Node.js
What is a Shim?
A software add-in that provides full support for a particular software standard
What are some examples of ECMAScript?
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
What is a part of ECMA6?
Support for constants, Block Scope, Arrow Functions, Template literals, Modules, Classes, Promises etc…
What are sets (set collections)?
Ordered lists of values that contain no duplicates. Accessed using keys
What are maps?
the map object holds key-value pairs. Any value (both objects and primitive
values) may be used as either a key or a
value
What are classes?
provides syntactical sugar. They offer a cleaner and more elegant syntax.
Getters and setters
Properties are nouns, methods are verbs
Inheritance
Concepts at higher levels are more general, concepts at lower levels are more specific(inherit properties of concepts at higher levels)
Arrow Functions
Shorter way of creating simple functions, called lambdas in other languages.
Are arrow functions named?
Arrow functions are not named, they can be assigned to a variable but are always anonymous
Arrow function syntax
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
Example for a function
function literal (declaration)
function add1(a, b) {
return a + b;
}