How does Unity "read" JavaScript code?

If I have an update function with many different statements, does Unity execute them all at once every frame, or execute them line by line? For example, lets say I have a control scheme that first has an if statement that moves the character side to side, then another if statement that moves the character up and down. Will Unity first move the character side to side, then up and down, or compute both movements at the same time?

Sorry if this is a really basic question (new to Unity), but it would be really helpful to know how Unity “thinks” so I better organize my code.

Thanks!

Line after line…just like everything else. There is no way to do different things at the same time. Often later lines depend on changes done in earlier lines…if anything did calculate different lines simultaneously, it would be next to impossible to write any code at all.

It takes one statement at a time, nut for a coroutine it jumps out of the update and put it on hold until the function returns. Smae when you have a callback function (Collision).

Technically, you all are right and wrong.
What is does is use somethingm im refering to Lua as a coder for it, is (string.gmatch(arg1,arg2)) or match the string.
It goes word, space, word, space and so on. Thats why when you play a code thats correct and you see if you use if’s instead of else if’s then you can do multiple things at once because it is matching the code up word by word. Enough said! BTW I hope ur under 15 cause im 15 -.-