Jan 23, 2023JavaScript Tip: Return Object Literal From an Arrow FunctionHow to return an object literal from an expression-bodied arrow function as introduced by ECMAScript 2015.
Jan 16, 2023JavaScript 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.
Jan 2, 2023JavaScript 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.
Dec 26, 2022JavaScript 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.