Full Immersion Flashcards
What is Array.prototype.filter useful for?
it is useful for creating a new array while excluding some elements
Array Filter Exercise
What is Array.prototype.map useful for?
it is useful for creating a new array containing the transformed elements of another
Array Map Exercise
What is a GUI?
Graphical User Interface: allows users to interact with electronic devices through graphical icons and audio indicators instead of text-based user interfaces, typed command labels, or text navigation.
Command Line Basics Exercise
What is a CLI?
Command Line Interface: processes commands to a computer program in the form of lines of text.
Command Line Basics Exercise
What is one use case for the cat command?
The cat command can concatenate the contents of text files.
Command Line Basics Exercise
What is one use case for the ls command?
The ls command can display a file name and any requested, additional information.
Command Line Basics Exercise
What is one use case for the pwd command?
The pwd command can print the current working directory.
Command Line Basics Exercise
What is one use case for the echo command?
The echo command can write arguments to the terminal or whatever the standard output is.
Command Line Basics Exercise
What is one use case for the touch command?
The touch command can create a new file.
Command Line Basics Exercise
What is one use case for the mkdir command?
The mkdir command can create a new directory or new directories as required.
Command Line Basics Exercise
What is one use case for the mv command?
The mv command can move a file.
Command Line Basics Exercise
What is one use case for the rm command?
The rm command can remove a file.
Command Line Basics Exercise
What is one use case for the cp command?
The cp command can copy files to another directory.
Command Line Basics Exercise
What is Webpack?
Webpack is a tool that lets you bundle your JavaScript applications and assets
Webpack Intro Exercise
How do you add a devDependency to a package?
To add an entry to the devDependencies attribute of a package.json file, on the command line, run the following command: npm install –save-dev
Webpack Intro Exercise
What is an npm script?
An npm script is a property on the package.json file that allows us to reference locally installed npm packages by name.
Webpack Intro Exercise
How do you execute Webpack with npm run?
npm run build (or whatever the webpack alias is, inside the package.json file)
Webpack Intro Exercise
How do you create “class” components in React?
You create class components in React similar to how a class is declared in JavaScript. Use the class keyword, the class name, the extends keyword and then React.Component and then the code block, which must include a render method.
class [ClassName] extends React.Component{ render(){ // render method code } }
React Class Components Exercise
How do you access props in a class component?
By using the props object, which is JSX attributes and children of the component as a single object.
props.prop-name
function Welcome(props) { return <h1> Hello, {props.name} </h1> } const element =
React Class Components Exercise
What is the purpose of state in React?
The purpose of state in React is for the storage of data specific to a component that may change over time.
If the value isn’t used for rendering or data flow, it does not have to be put in the state.
Treat this.state as if it were immutable, because calling setState() after mutating this.state may replace the changes you made.
React Events and State Exercise
How do you pass an event handler to a React element?
Add a function to the class component and bind the method to the constructor
React Events and State Exercise
What are the three great virtues of a programmer?
- Laziness
- Impatience
- Hubris
Command Line Basics Exercise
What is Array.prototype.reduce useful for?
Array.prototype.reduce is useful for executing a reducer function on each element of an array, resulting in a single output value
Array Reduce Exercise
What is Node.js?
Node.js is a program that allows JavaScript to be run outside of a browser
Node Intro Exercise
What can Node.js be used for?
Node.js can be used to build back ends for web applications, command-line programs, or any kind of automation that developers wish to perform.
Node Intro Exercise
What is a REPL?
REPL stands for Read-Eval-Print-Loop, which is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user
Node Intro Exercise
When was Node.js created?
Node.js was created in 2009 by Ryan Dahl.
Node Intro Exercise
What back end languages have you heard of?
PHP, Python, Ruby on Rails, Java, C++
Node Intro Exercise
What is a computer process?
The instance of a computer program that is being executed (by one or many threads). It contains the program code and its activity.
Node Process Exercise
Roughly how many computer processes are running on your host operating system (Task Manage or Activity Monitor)?
Roughly 300 processes are running on my host operating system.
Node Process Exercise
Why should a full stack Web developer know that computer processes exist?
Web development involves making multiple processes work together to form one application.
Node Process Exercise
What is the process object in a Node.js program?
The process object is a global object that provides information about and control over, the current Node.js process. The process object is an instance of EventEmitter, which is a class that is defined and exposed by the "events" module.
Node Process Argv Exercise
How do you access the process object in a Node.js program?
You can always access the project object in a Node.js application as it is in the global scope, even without using require().
Node Process Argv Exercise
What is the data type of process.argv in Node.js?
The datatype of “process.argv” in Node.js is a string array.
Node Process Argv Exercise
What is the JavaScript Event Loop?
The Event Loop allows asynchronous handling of tasks. The Event Loop is one of the four major concepts of JavaScript (Prototypal Inheritance, How ‘this’ works, closures, and The Event Loop).
The Event Loop Exercise
What is the difference between “blocking” and “non-blocking” with respect to how code is executed?
Blocking code is currently in the call stack, non-blocking code is code that goes back into the callback queue.
The Event Loop Exercise
What is a JavaScript module?
In JavaScript, a module is a single .js file.
Node Module System Exercise
What values are passed into a Node.js module’s local scope?
The values: exports, require, module, __filename, and __dirname, are all passed into a Node.js module’s local scope.
Node Module System Exercise