I'm trying to create this function but this annoying blacklist keeps triggering.
function blackListed(argument){
if (typeof argument == 'string'){
return Number(argument)
}
else
{
return String(argument)
}
}
And that didn't work, I got this response back: ERROR: Your code contains blacklisted characters: ( ) ( ' ' ) ( ) ( )
Can you try to find a way to create a function that will convert strings to numbers and numbers to strings?
I've checked all the characters and these are getting filtered, and also I think there is a limit of 100 characters.
` ' " . ~ ( ) 0 1 2 3 4 5 6 7 8 9 /
First install the required libraries to test your code.
npm i mocha chai assert --save
After you've done that write your code in solution.js and run npm test to check if you completed the challenge.
Don't use the keyword let because it can't be accessed.
Originally posted on codewars but got retired.