Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which expression returns a numeric ascending order without changing scores?" on CodeWiki (https://codewiki.com/practice/mcq/javascript/array-methods/choose-copying-sort/).
Context (verbatim from the page):
"""
Which expression returns a numeric ascending order without changing scores?
scores.toSorted((a, b) => a - b)
scores.sort()
scores.sort((a, b) => a - b)
scores.toSorted()
"""
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.