Pregunta de entrevista de Uber

Write a function to return result from a cd command in a terminal.