Modular Design Good software is almost always decomposed into modules that are relatively independent of each other. Independent modules makes congitive load easier on the developer working on the software. In an ideal scenario this independence is hard to achive. A good guiding principle to create best modules is to write deep modules. Deep Modules Shallow Modules
The IP address for localhost is traditionally 127.0.0.1, so you’d expect http://localhost:9999 and http://127.0.0.1:9999 to be the same origin. BUT. The origin comparison only compares the string values of the scheme, host, and port, and knows nothing about what host an IP address maps to. In my example, “localhost” and “127.0.0.1” are different strings, and therefore the request isn’t a same-origin request.
The || (OR) operator The || (OR) operator will return the right operand if the left operand is falsy (false, 0, empty string, null, undefined, NaN). When to use? Use || when you want to provide a fallback for any "falsy" value. ?? (Nullish Coalescing) operator The ?? (Nullish Coalescing) operator will only return the right operand if the left operand is null or undefined. When to use? Use ?? when you want to provide a default value for null or undefined, but consider 0 and empty strings to be valid values. Example