1var stringWithLineBreaks = `
2O boy
3I've got
4Breaks
5`;
6var stringWithoutLineBreaks = stringWithLineBreaks.replace(/(\r\n|\n|\r)/gm, "");//remove those line breaks
1<script type="text/javascript">
2 var get_banner_detail = `<?php echo json_encode($get_banner_detail); ?>`;
3
4 exam = get_banner_detail.replaceAll(/(\r\n|\n|\r)/gm, '<br>');
5</script>