Update scripts.js

Could not get the forloop to work.