Jump to content

JavaScript String


Chikwado

Recommended Posts

What do you mean with "break javascript string text"?

 

Do you mean a line break?

If you're outputting this to HTML, you need to use a <br> element. If this is in the console or an alert() box, then n is enough.

Link to comment
Share on other sites

Are you talking about breaking long strings across lines?

var mystr = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbb"           +"ccccccccccccccc ddddddddddddddddddddd eeeeeeeeeeeeeee"           +"ffffffffffffff ggggggggggggggg hhhhhhhhhhhhhhh iiiiiiii"           +"jjjjjjjjjjjjjjjjj";
Link to comment
Share on other sites

Congratulations!  Exactly! Davej.       While writing in my notepad, some times when I look at the left side that I started the "var" it's a long way. Ok, to the right side it's over 100cm. I need to jump to the next line.                                            Somethings
like this seem to work:
var myText ="some text" + "some more text";
Edited by Chikwado
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...