Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which statement about var items []string and items := []string{} is correct?" on CodeWiki (https://codewiki.com/practice/mcq/go/slices/nil-empty-contract/).
Context (verbatim from the page):
"""
Which statement about var items []string and items := []string{} is correct?
Both compare equal to nil.
Both have length zero and accept append, but their default JSON encodings differ.
Only the empty literal can be ranged over.
The nil slice cannot be passed to copy.
"""
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 Go. Where you are unsure, say so.