Complete tenth learnyounode challenge