+ 3
Lines in a code
What do you base on to start another line of code during writing code(why can't you write it on a single line)
3 odpowiedzi
+ 4
Magala Reuben
I'm well versed in HTML....
And here, the tags are in two types, EITHER INLINE OR BLOCK ELEMENTS
So, for instance, when you use a block element, you may put as much in a single line...but the output/result will show them on different lines
All I can say is that the code is not written in a single line so as to make it more readable and easier to go through, debug and thus make changes and corrections
+ 3
(Adding to ME_GUY_COROVITA 's answer...)
JS is an interpreted language so it translate the source code to machine understanding code "one statement at a time" inorder to ease up the language interpreter's jobs the language is designed to be code that way(syntaxically P. S I'm not talking about one liner here).
For the case of compiled language... the reason the language was designed to be coded line by line is also because the language wants the compiler's works to be easier since lexical analysis first reads a stream of characters from a source code file(usually a line/statement) and generates a stream of lexical tokens.
[Also for readibility and compatability.]
edited: I maybe wrong! 😅😉
0
If you don't want to break your line use
tag{
White-space :nowrap ;
}