+ 2
How can make a new line for this my JavaScript code? I want them to be on separate lines.
var myArray = []; myArray = ["Safianu Mohammed", "mohammedsafianu"]; function cutName(name){ var fname = name; return fname; } document.write(cutName("[\"Safianu\", \"Mohammed\"]")); var myInfo = {}; myInfo = { fullName: cutName(name), skype: myArray[1], github: "null" }; document.write(myInfo.fullName, myInfo.skype, myInfo.github);
4 ответов
+ 1
stop use document.write(), start use html tags
- 1
@Andrew, its JS, not Java. method document.write() put text in DOM so maybe <br> in the end of the line will help