Update script.js

This is a bug, when sorting from largest to smallest this is the required code