Using unary operator and recursion ANUPAM CHAUDHARY solves the problem of not using a number in our entire code. If the number can’t be converted into a number, it would simply return NaN. The code is fairly simple to understand and if you have any suggestions or another version of the code, would love to see them in the comments.

1m read timeFrom javascript.plainenglish.io
Post cover image
2 Comments

Sort: