JS ES6 Flashcards
What does block scope mean?
scope within a code block
What is the scope of a variable declared with const or let?
block scope
What is the difference between let and const?
let can be reassigned later
What is the syntax for writing a template literal?
backticks to surround the string and also ${} to surround javascript objects
What is destructuring, conceptually?
how you get properties or array elements all on one line
What is the syntax for Object destructuring?
const {s, t, u, f, f} = objName;
What is the syntax for Array destructuring?
const [index1, index2, indexX] = arrName;
How can you tell the difference between destructuring and creating Object/Array literals?
the curly braces or array braces will be on the left side of the equals sign
What is the syntax for defining an arrow function?
variable declaration if not inline, then parens with parameters
When an arrow function’s body is left without curly braces, what changes in its functionality?
it automatically has a return without braces
How is the value of this determined within an arrow function?
At definition time
man
cat
ls
pwd
echo
touch
mkdir
mv
rm
cp
man - manual
cat - concat files
ls - list dir contents
pwd - print dir
echo - display text
touch - change timestamp
mkdir - make directories
mv - rename a directory
rm - deletes
cp - copy files/dirs
What can Node.js be used for?
command line apps, automation, back-end servers
What is a REPL?
read, eval, print, loop
What is a REPL?
read, eval, print, loop