komodo - indent to next line in javascript -
i using komodo ide 8.5
i trying indent next line prevent code extended far right everytime indent. breaks line , dose not register. i'm not quite sure how word it.
example:
var cost = 60; if (price > 60) document.write("<p> brownish fox jumped cold river.</p>")
but want , still function :
var cost = 60; if (price > 60) document.write("<p> brownish fox jumped cold river.</p>")
or similar. when indent breaks line of code , de-colorizes , shows not beingness correct.
how can accomplish this? ide or need kind of syntax indicate im doing?
you have escape new-line, back-slash:
var cost = 60; if (price > 60) document.write("<p> brownish fox jumped \ cold river.</p>")
note that, approach, whitespace indentation form part of string. , it's worth noting that, if if
statement spans multiple lines, practice wrap block curly braces, if clarity when code reviewed , maintained, later, or others:
var cost = 60; if (price > 60) { document.write("<p> brownish fox jumped \ cold river.</p>") }
javascript komodo
No comments:
Post a Comment