JSFiddle - React, Tailwind, and code Playground
JavaScript
let my_code = `
alert("abc \n cde");
alert("efd \n hij");
alert("klm \n opq");
alert("stu \n vwx");
`;
console.log( my_code )
my_code = my_code.replace(/\n/g, '@');
console.log( my_code )