Implemented JavaScript solution for problem 1.4. Implemented test script for 'replaceSpaces(str)'.