Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "What does calling the inherited static method print?" on CodeWiki (https://codewiki.com/practice/predict/javascript/private-fields/predict-static-derived-receiver/).
Context (verbatim from the page):
"""
class Sequence {
static #next = 1;
static take() {
return this.#next++;
}
}
class RegionalSequence extends Sequence {}
console.log(Sequence.take());
try {
RegionalSequence.take();
} catch (error) {
console.log(error.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.