Algotec Interview Question

implement a function that returns a string without spaces.