Doubt on HTML code in project 3 Controlling Led

In project 3 named controlling LED, I have one doubt, In html code inside head tag, why we use two script tag. why can’t we put that second script tag code inside first script tag code to reduce the code length. Please reply as soon as possible!.

@ramanenvenki We use the first script tag to import an external javascript file, as you can see it has the src attribute.

Look at the second one, we write our own javascript, no src attribute.

This is the reason we use two tags.