WD Flashcards
(135 cards)
cli
What does it stand for? What is it?
Command line interface
Text-based interface where you can input commands that interact with a computer’s operating system
(Ex. Bash, cmd, powershell)
gui
What does it stand for? What is it?
Graphical user interface
Form of user interface that allows users to interact with electronic devices through graphical icons and visual indicators
(Ex. Windows, macOS, and android environments, the files/folders you see on the desktop)
jsx
What is it?
(JavaScript XML)
A syntax extension for JavaScript that lets you write HTML-like markup inside a JavaScript file
- simply: what let’s you write HTML in a JavaScript file
Hooks
- are specific to react
- classes are a part of JavaScript
./
Ex: ‘./index.css’
Means it’s in the same folder
export default
How many things does it export?
1
State
Is a built-in React obj that is used to contain data / information about the component
JSON
What does it stand for? What is it?
JavaScript Object Notation
- it is a lightweight data interchange format for storing and exchanging data
- used to transmit data between server and web app
- represented as key-value pairs (similar to obj literals in JS)
- text, in JS object notation
JSON.parse()
What does it do?
Translates JSON into a JavaScript object
JSON.stringify()
What does it do?
Translates a JavaScript obj into JSON
../
Means exit the folder that you’re in
Promise
What is a promise?
Promise is an obj..that produces a single value sometime in the future
- resolve value or reject
3 states of a promise
- fulfilled
- rejected
- pending
AJAX
what does it stand for? what is it? what does it do?
Asynchronous JavaScript and XML
- it is a technique/method that allows you to create asynchronous web apps
- allows parts of the web page to be updated without reloading the entire page
- it sends and retrieves data in the background while the user interacts with the page
Benefits of AJAX
- page updates quicker
- less data is downloaded on updates which results in less wasted bandwidth
- feels faster and more responsive because you don’t have to wait for the page to refresh
Async/Await (es8)
What does async do? What does await do?
Async makes a function return a promise
Await makes an Async function wait for a promise
- Async/await is built on top of promises
- allows you to write asynchronous code in synchronous manner
- doesn’t have resolve or reject params
- everything after await is placed in an event queue
CDN
What does it stand for?
What is it?
Content Delivery Network
Is it a network of interconnected servers that speeds up webpage loading for data-heavy applications
DNS
What does it stand for?
Domain Name System
API
What does it stand for?
Application Programming Interface
console.error vs throw new error
What is the difference?
console.error
- method provided by browser’s console obj in JS
- used to log error messages in console
- does not stop the execution of a program
throw new Error
- used to explicitly throw an exception(an error) in JS
- used when you want to indicate that something unexpected happened and you want to stop the normal flow of the program
Benefits of CDN (content delivery network)
- faster content delivery: users can access content from a server that is physically closer to them, reducing latency and improving page load times
- improve website performance: CDNs cache static content(img, Stylesheets, scripts, etc) on edge servers. Cached content can be served directly from the edge server, reducing load on the origin server and speeding up content delivery
- loading balance
- distributed global presence
- bandwidth savings
- security enhancements
- scalability
- caching strategies
- cost efficiency
- content analytics
.finally() (es9 2018)
When is it used?
Good for when you need to run a piece of code no matter what after a promise
for await of (es9 2018)
What does it do?
Creates a loop that iterates over an array of async iterable objs, as well as sync iterables
Promise.allSettled() (es2020)
Takes an array of promises and returns a single promise, an array of objs that describe the outcome of each promise