async / await
const foo = async () => {
let result = await Promise.resolve(true);
return result;
};
Object.values()
const obj = {
key1: "value1",
key2: "value2",
}
let values = Object.values(obj);
console.log(values);
Object.entries()
const obj = {
key1: "value1",
key2: "value2",
}
let entries = Object.entries(obj);
console.log(entries);
String Padding
let str = "hi";
str = str.padStart(3);
str = str.padStart(5, "*");
let str = "hi";
str = str.padEnd(5);
str = str.padEnd(8, "*");
Trailing commas in function parameter lists and calls
foo(
a,
b,
)
Object.getOwnPropertyDescriptors()
const description = Object.getOwnPropertyDescriptors(obj);