Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-09-2012, 02:59 PM   PM User | #1
aaronoafc
New Coder

 
Join Date: Feb 2012
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
aaronoafc is an unknown quantity at this point
Just a quick question about line break

Hi guys, just a quick question about a line break in JavaScript, where would I do it? If you see I have two math operators here and want them to be on two separate lines, were do I put the line break?

Thanks

Code:
<!doctype html>

<head>
</head>
<body>

<script type="text/javascript">
	var apples = 4+76;
	document.write(apples);
	
	var multiple = 54*11;
	document.write(multiple);
</script>


</body>
</html>
aaronoafc is offline   Reply With Quote
Old 02-09-2012, 03:11 PM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
For your example
Code:
document.write(apples+"<br/>");
I am fine with "document.write" if you are a real beginner. But you should get rid off that as soon as possible and use the proper DOM manipulation methods instead
devnull69 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:30 AM.


Advertisement
Log in to turn off these ads.