Hi everyone,
I have tried to do this exercise but nothing works. Can anyone help me?
Create a function named extractPassword which takes an array of characters (which includes some trash characters) and returns a string with only valid characters (a - z, A - Z, 0 - 9).
Here’s an example:
**extractPassword(['a', '-', '~', '1', 'a', '/']); // should return the string 'a1a'**
**extractPassword(['~', 'A', '7', '/', 'C']); // should return the string 'A7C'**