`str.split('').join("")` would just return the string itself, so those two calls shouldn't be needed.