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 after three of five replicas become unreachable?" on CodeWiki (https://codewiki.com/practice/predict/architecture/cap-theorem/predict-quorum-availability/).
Context (verbatim from the page):
"""
const replicas = 5;
const quorum = Math.floor(replicas / 2) + 1;
const reachable = 2;
console.log(reachable >= quorum ? 'commit' : 'reject');
console.log({ reachable, quorum });
"""
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.