title: How does a browser compile source code?
body: <p>everyone, a newbie here!</p>
  
  <p>Today I have a question about how Chrome browser knows what to do after reading the source file. More generally, I am trying to understand what happens when we run our .js files in Chrome.</p>
  
  <p>Here is what I mean specifically. Imagine you are a source code that lives inside Chrome. Beyond a random LCD monitor screen, a person aka user makes an interaction with the website that you are rendering, that asks you to call <code>drive()</code> function which is dependent on so many other functions. </p>
  
  <p>There are two ways (or more...) that we humans drive. First, you drive just by muscle memory. On the other hand, when you are first learning to drive, you should learn how accelerator, brakes, and headlight works. After some time, you can drive effortlessly.</p>
  
  <p>So here it comes the question. Does chrome know what to do by muscle memory, or does it learn from the very top to bottom what to do. If this is the case, does it have to learn all again when it encounters <code>drive()</code> function the second time?</p>
  
  <p>*I know this could be a compiler-related 'duplicate' question, but I am a newbie and don't know enough keywords to look up what I need... Also thought asking about how web browsers work. </p>