JavaScript Tip: Throw an Error if a Required Parameter Is MissingDefault function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
JavaScript Tip: How to Sort an Array of IntegersTo sort an array of integers in JavaScript, we must provide a compare function that defines the sort order.
JavaScript Tip: Replace Switch Statements With Object LiteralsI prefer using JavaScript's object literals over switch statements as the code is faster, more readable, and less verbose.
JavaScript Tip: Return Object Literal From an Arrow FunctionHow to return an object literal from an expression-bodied arrow function as introduced by ECMAScript 2015.