167 views
Typical inverter: from string to number and back
Asked at
Task condition
The task is to define the function types so that its result has the opposite type of the input parameter. The function receives a value of type string or number. If a string value is passed, the function should return a number, and if a number is passed, it should return a string.
function test = (input) {}