Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "In Node 24, what primarily determines whether app.js is ESM or CommonJS?" on CodeWiki (https://codewiki.com/practice/mcq/javascript/modules/node-js-format-boundary/).
Context (verbatim from the page):
"""
In Node 24, what primarily determines whether app.js is ESM or CommonJS?
The type field in the nearest parent package.json
Whether the file contains an import declaration
Whether package-lock.json exists
The current working directory name
"""
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 JavaScript. Where you are unsure, say so.