Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,473
There are 2245 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

javascript variables not spanning more than one line

Thread title: javascript variables not spanning more than one line
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
01-09-2009, 01:45 PM
#1
Jason Batten is offline Jason Batten
Jason Batten's Avatar
Status: I'm new around here
Join date: Jun 2006
Location:
Expertise:
Software:
 
Posts: 13
iTrader: 0 / 0%
 

Jason Batten is on a distinguished road

  Old  javascript variables not spanning more than one line

Hey all,

Does any one know why JavaScript variables do not span more than one line like in PHP? See examples below.

In PHP you can:
PHP Code:
$someVar 'One line
two line
Three lines and so on'

JavaScript you have to:
Code:
var someVar = 'one line';
someVar += 'two line';
someVar += 'three lines and so on'
Doing JavaScript like this is very bad for maintaining HTML, anyone know of a better way of spanning multiple lines with JavaScript?

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed