Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Why are ES modules generally easier to tree-shake than CommonJS modules?" on CodeWiki (https://codewiki.com/practice/mcq/frontend/checkpoint-4/checkpoint-4-rule/).
Context (verbatim from the page):
"""
Why are ES modules generally easier to tree-shake than CommonJS modules?
Static `import` and `export` declarations let tools analyze bindings before execution.
ES modules guarantee that every imported file is free of side effects.
CommonJS always downloads modules from the network at runtime.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Frontend. Where you are unsure, say so.