Please enable JavaScript to use CodeHS

Exercise : Say It Three Times!

2 points

Say It Three Times!


(function() { var testResults = []; %StudentCode% // student code %SolutionCode% // solution code function assertEquals(test, studentOutput, solutionOutput, passMsg, failMsg, isHiddenTest) { // Deep compare the results with underscore. var success = _.isEqual(studentOutput, solutionOutput); var message = success ? passMsg : failMsg; testResults.push({ message:message, // Stringify to get pretty printed objects and arrays. solutionOutput: JSON.stringify(solutionOutput), studentOutput: JSON.stringify(studentOutput), success: success, test:test, isHiddenTest: isHiddenTest }); } %TestCases% return testResults; })();