Refactored code in 'index.html' and 'main.js' for 'reverseString()' code to be simple