Note that the preceding line of code is an example of a JavaScript statement. Every line of code between the <script> and </script> tags is called a statement, although some statements may run on to more than one line.

This is really tripping me up a little bit. I'm specifically not sure how to is used in this particular situation. Obviously, what this says is that some statements take up or occupy more than one line and are still considered one statement. The preposition to usually means that something is moving in the direction of a particular location, but a statement doesn't really run in the direction of more than one line, it runs ON them—it is ON lines, say, 5 and 8. How can it be or run TO lines 5 and 8? Or is this just the way you typically say it in contexts like this?


2 Answers 2


If a single statement is on lines 5 and 8, it must be on lines 5, 6, 7 and 8. So the statement runs from line 5 to line 8.

Rather than thinking of a statement as a single object, think of it as a series of letters and characters, just like this paragraph. The paragraph wasn't finished when it got to the end of one line so it ran on to the next line.


To does not mean "in the direction of"—that's toward. To designates a goal or destination, as in I'm going to London. In this case, the "destination" is the place where the line ends.

Note, however, that this is more often written and spoken runs onto the next line. The difference is very slight, and onto, with on- stressed, probably reflects the fact that we speak of something being located on a particular line of text. This author's use might be influenced by the notion of running on and on . . .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .