Semicolons can be omitted in single statement blocks, function expressions, IIFE, and arrow functions, but are required for multi-line statements and to separate logical code blocks. Consistent use of semicolons improves readability.
JavaScript's semicolon auto-insertion feature makes them optional in many cases, but they're still required to avoid statement concatenation errors and when using Immediately Invoked Function Expressions (IIFE). Semicolons are automatically inserted at the end of a line, file, or after return, throw, and break statements without intervening tokens.
