var text = "'I'm the cook,' he said, 'it's my job.'";

console.log(
        text.replace(/([a-z])'([a-z])/gi, "$1~~$2")
        .replace(/'/g, "\"")
        .replace(/~~/g, "'"));

let text = "'I'm the cook,' he said, 'it's my job.'";
// Change this call.
console.log(text.replace(/(\W|^)'|'(\W|$)/g, '$1"$2'));
// → "I'm the cook," he said, "it's my job."

Add Chapter 09, exercise 2
Add Chapter 09, exercise 2
