Home / Javascript Tips Generated By ChatGPT / Using Logical OR (||) for Default Values in Javascript Use || to provide a default value if the first value is falsy. Source Code let userName = null; let displayName = userName || 'Guest'; console.log(displayName);