JSFiddle - React, Tailwind, and code Playground

JavaScript

var test1 = "test\n\ntest";
var test2 = "test\n\
\n\
test";

alert(test1);
alert(test2);