How to break a line code in JavaScript

2 Answers

0 votes
<!doctype html>
<html>
<head>
</head>
<body>

<p id="id-p"></p>
<script>
document.getElementById("id-p").innerHTML =
"JavaScript";

/*
run:

JavaScript

*/
</script>
</body>
</html>

 



answered Aug 30, 2016 by avibootz
0 votes
<!doctype html>
<html>
<head>
</head>
<body>

<p id="id-p"></p>
<script>
document.getElementById("id-p").
innerHTML = "abc";

/*
run:

abc

*/
</script>
</body>
</html>

 



answered Aug 30, 2016 by avibootz

Related questions

2 answers 217 views
1 answer 233 views
2 answers 148 views
1 answer 172 views
3 answers 223 views
...