What is the DOM and what does it stand for?
The Document Object Model is an object representation of the html elements of a webpage
What is an event?
Events are things that happen to the dom/actions a user performs on a page
What is a component?
a block of reusable code made up of html, css, and js
what does the setTimeout function do?
wait a set amount of time before executing the code inside of it
name 4 data types in javascript
string, array, object, number, boolean, null, undefined, etc.
What would a selector like querySelectorAll return?
Nodelist
what does .addEventListener do?
choose specific elements to listen to specific events and fire a callback when that event occurs
what does .createElement do?
creates an HTML element
what does it mean to have our code be 'asynchronous'?
True or False: arrow functions no binding of the 'this' keyword
true
what is a nodelist?
collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll(). 'array-like'
what does .preventDefault() do?
blocks the default behavior of an element
what two array methods would you use most with components?
.map and .forEach
What is a promise?
a design pattern for use when handling asynchronous code in JavaScript. We use them as an alternative to nesting multiple callbacks.
name 5 array methods
forEach, filter, map, reduce, splice, includes, indexOf, sort, etc.
Name 3 DOM selectors
getElementsByTagName,
getElementById,
getElementsByClassName etc.
what is the purpose of stopPropagation()?
to prevent bubbling up to parent elements or capturing down to child elements
what two methods are use to add elements to another element?
appendChild and prepend
what two methods must EVERY promise have attached to it?
.then and .catch
what is the mechanism by which JS objects inherit from one another?
Prototypes
what is capturing in JavaScript?
when, the event is first handled by the outermost element and propagated to the inner elements.
what is bubbling in javascript?
when an event is first called and handled by the innermost element and then propagated to outer elements.
Name 4 HTTP request methods
GET, POST, PUT, DELETE
what is an HTTP method and what does HTTP stand for?
Hypertext transfer protocol provide a common language or nomenclature that the client can use to let the server know what operation it wants to perform.
what does 'use strict' do?
indicates that code should be executed in 'strict mode'
---------------------------------------------------
Eliminates some JavaScript silent errors by changing them to throw errors.
Fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that's not strict mode.
Prohibits some syntax likely to be defined in future versions of ECMAScript.