Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "What does this program print?" on CodeWiki (https://codewiki.com/practice/predict/javascript/string-methods/predict-immutable-cleanup/).
Context (verbatim from the page):
"""
const source = " Alpha ";
source.trim();
console.log(JSON.stringify(source));
console.log(JSON.stringify(source.trim()));
"""
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.