modified script.js file for pig-latin project. Now, it's working for sentences as well