Including code with JS

Basic question with probably a deep answer. I’ve been planning on buying myself some Javascript books but not gotten round to it.

How does one include code from a file using javascript? (I know i’m not explaining it very well).

for example: Adsense, Shoutmix.