Javascript interview test