ES6 Flashcards
(132 cards)
What is the syntax for writing a template literal?
it uses backticks instead of quotes
What is “string interpolation”?
the ability to substitute part of the string for the values of variables or expressions
What is destructuring, conceptually?
unpacking values from objects or arrays and assigning it to variables
What is the syntax for Object destructuring?
variable declaration curly braces property keys equal sign and object being destructured
what is the syntax for array destructuring?
variable declaration square brackets elements and array being destructured
How can you tell the difference between destructuring and creating Object/Array literals?
destructuring has the array/object on the left of the equal sign. creating has it on the right side of the equal sign.
What is syntax for defining an arrow function?
parameter, arrow function keyword, statement/expression
When an arrow function’s body is left without curly braces, what changes in its functionality?
doesn’t need a return statement
How is the value of this determined within an arrow function?
at definition time
What is Node.js
its an asynchronous event-driven JavaScript runtime. aka you run js outside the web browser
What can Node.js be used for?
it can be used to build scalable network applications like web servers or cmd line applications.
What is REPL
it stands for read-eval-print loop that takes a single user input executes them and returns the result to the user.
When was Node.js created?
2009
What back end languages have you heard of?
Node, python, ruby, c, c++, java, c#, php, JavaScript, go, rust
Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?
around 300+cd processes
Why should a full stack Web developer know that computer processes exist?
because they are making multiple processes work together to form one application.
what is a computer process
the instance of a computer program being executed by one or many threads.
what is the process object in a Node.js program?
an object that provides information about, and control over, the current node.js process.
How do you access the process object in a Node.js program?
its always available to node.js applications without using require().
What is the data type of process.argv in Node.js?
an array of strings
what is a javascript module?
a js file
What values are passed into a Node.js module’s local scope?
__dirname __filename module require exports
Give two examples of truly global variables in a Node.js program.
process, console, global
what is the event.loop
The event loop is a process that keeps running and checks whether the call stack is empty or not. If the call stack is empty, it pushes the first item of the message queue into the call stack for execution.