X interview question

Remove certain characters from an array