Reputation: 3054
This is probably a dumb question, but how do you know when something needs to go through a "build" or be compiled? My understanding of it is that when you code, you are writing source files, when then, in order to be understood by the computer, will need to be compiled to executable files. But then, how come I can just write a index.html and pull it into my browser for it to work? When did the compiling happen in this situation? How does this compare to the compiling that happens when you use build tools like npm?
Upvotes: 0
Views: 695
Reputation: 3965
Compiling means to make a list of machine codes that can be stored and executed by the machine. Browsers do not do that they just parse and execute the language without building a list. (Although often as mentioned in comments for faster execution, code may be compiled on the fly and sent to CPU as machine codes.)
Upvotes: 1