In short we could say that:
argument— An argument is a value passed to a function.
parameter— A Parameter is a variable used in the declaration of a function. …
Introduced in 2015 with ECMAScript6, template literals let us dynamically construct strings of text and embedded expressions, even multi-line strings of text, in a more elegant way than concatenation.
The syntax is not much different from the old one at first glance:
const newWay = `is cool`;
Can you spot the difference? Instead of single
'’ or double
"” quotes we use backticks
In ES5 you had string concatenation:
const name = 'Jack';
const old = 'My name is '+ name + '.';
+ for both addition and concatenation can be confusing and even lead to unexpected bugs:
Proxy object wraps another object and acts as a middleman.
A proxy is created using the
new Proxy constructor with two required arguments: the target and the handler.
let proxy = new Proxy(target, handler)
target— The object we wrap.
handler— An object that defines the methods (also called traps) to control the behaviors of the target.
Proxy creates an undetectable barrier around the target object that redirects all operations to the handler object. …