In Javascript there may be complex outputs that contain multiple strings and variables together.
They may also include multiple open quotation marks, which make them even more complex.
Often there is a need for a new line in Javascript, then a break line in HTML code.

Example combination strings and variables, write quotation marks...

<p id="demo"></p>

var name ="Sebastian";
var nickName='"Einstein"';
var age=30;
var position=age/2;

var greeting="Wellcome Mr."+name+", so-called " +nickName+ ", age "+age+".<br>You are in a\
position "+age/2+" that is half your age.
So the position is "+position+"!";



Privacy Policy