At present proposed solution for 09_2_quoting_style.js is
let text2 = "'I'm the cook,' he said, 'it's my job.'"; // Change this call. console.log(text.replace(/(^|\W)'|'(\W|$)/g, '$1"$2'));
I stumbled accross this one:
console.log(text.replace(/\B\'/g, "\""));
which, also gives the same result. Is it reasonable?
At present proposed solution for 09_2_quoting_style.js is
let text2 = "'I'm the cook,' he said, 'it's my job.'"; // Change this call. console.log(text.replace(/(^|\W)'|'(\W|$)/g, '$1"$2'));
I stumbled accross this one:
console.log(text.replace(/\B\'/g, "\""));
which, also gives the same result. Is it reasonable?