// Select all, copy and paste into the console // Read the task in the comments below the tests function runTests(solutionFn) { const tests = [ { input: 'hello', expected: 'olleh' }, { input: 'world', expected: 'dlrow' }, { input: '', expected: '' }, { input: 'a', expected: 'a' }, { input: '1234', expected: '4321' } ] for (const test of tests) { const result = solutionFn(test.input) const isPass = result === test.expected const resultStr = isPass ? 'PASS' : 'FAIL' console.log( `argument: "${test.input}" --> %c${resultStr}%c got: "${result}", ${ isPass ? 'as expected' : `but expected: "${test.expected}"`}`, isPass ? 'color: lime' : 'color: red', '' ) } } void setTimeout(() => runTests(solutionFunction), 0) var solutionFunction = // Try not to change the code above // Your task, should you choose to accept it, is to // implement a function that takes a single string // and returns the reversed string // Write your solution below, start with any function literal