You can use `scripts.slice(0)` here.