Write a function f(a, b)
which takes two strings as arguments and returns a string containing only the characters found in both strings, in the order that they appeared in a
.
Original implementation found here: https://github.com/blakeembrey/code-problems/blob/master/common-string-filter/index.js
Nice! Just updated mine to include any characters. Only issue with my approach is the returned string is not a unique set of characters, it may contain repeats in cases of, e.g.
f('aa', 'a')