What is the key difference in syntax between CommonJS and ES Modules for importing modules?
The fundamental syntax difference between CommonJS and ES Modules lies in their import/export mechanisms: 1) CommonJS uses require() for imports and module.exports or exports for exports, 2) ES Modules use import and export keywords with more flexible syntax options, 3) CommonJS syntax is more dynamic and can be used within conditional statements, 4) ES Module syntax is static and must be used at the top level, 5) ES Modules support named exports and default exports with distinct syntax, 6) CommonJS typically uses object destructuring for selective imports, 7) ES Modules' static nature enables better tree-shaking and optimization.