Created
May 25, 2023 15:41
-
-
Save onosendi/52377757771c96a9eb57ee26ebbd5d47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const foo = (str, res = '') => (Number.isNaN(Number.parseInt(str[0], 10)) | |
? res | |
: foo(str.slice(1), res + str[0])); | |
console.log(foo('4528 Date: ORDER')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment