To add a new line into a JavaScript string can I use the following code?

Is it according to programming standards? Is there another way to do this?

For example,

```
var string = "check";
alert(string);
var newstring = string + "\n\n";
alert(newstring);

```