JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
var text = testimonials = [
'"This was a great experience" \n - Max Cameron, ThinkTank',
'"This was a great experience" \n - Max Cameron, ThinkTank',
"source code"
];
var fixed = [];
for(var i = 0; i < text.length; i++){
var t = text[i]
fixed.push(t.replace(/\n\r?/g, '<br />'));
}
$('div').html(fixed.join("<br/><br/>"));