I added a separate javascript file for my html file on sorting movies.