Update scripts.js

Moved containerElement initialization out of the declaration.