refactored firstReverse.js code is now lint free