Bootcamp Notes – Day 14 (Wed) – Bootstrap: Week 5 Glossary
Week 5 Glossary
A |
---|
Arrow functionsArrow functions were introduced in ES6 JavaScript and have a shorter syntax than function expressions or function declarations. Aside from syntax differences, they do not have their own this binding.
|
C |
---|
ConstConst is a new variable declaration keyword introduced in ES6. It is block scoped. Variables declared with const must be initialized at declaration, and cannot be reassigned.
|
E |
---|
Event handlersEvent handlers are typically functions that are registered to a DOM node intended to respond to a particular event firing. Two ways to register event handlers are by using the onevent handlers, or event listeners. Some documentation may specifically refer to onevent handlers when speaking of event handlers. Generally speaking, event handlers are the code that responds an event, and the functions that addEventListener runs when the event it’s listening for is fired off may be referred to as event handlers as well.
|
Event listenersEvent listeners are added to and removed from DOM nodes using the addEventListener and removeEventListener methods. They specify a particular event to listen for, and a function to run when the event is fired. The function that’s run when the event is fired may be referred to as the event handler. Thus, event listeners may be considered as a way to register event handlers, similar to the onevent handlers.
|
EventsEvents are occurrences that can happen within a system that can be observed and used to trigger responses. In the DOM/browser, that includes events such as a document finishing loading, a button being clicked, a window being scrolled or changed in size, et cetera. There are dozens of different DOM/browser events.
|
F |
---|
Function declarationsFunction declarations are the original way to create a function in JavaScript. A function declaration begins with the function keyword, followed by a name for the function, a parameter list in parentheses, then the function body. Function declarations are hoisted.
|
Function expressionsFunction expressions came after function declarations in JavaScript, but before arrow functions. With function expressions, you use the function keyword to define a function within an expression. Function expressions can be named or anonymous, and they are not hoisted.
|
L |
---|
LetLet is a variable declaration keyword in JavaScript that was introduced in ES6. It is block scoped.
|
S |
---|
Scope |
V |
---|
VarVar is the original variable declaration keyword in JavaScript. It is function scoped. It is largely deprecated in favor of the use of the new variable declaration keywords, let and const.
|