Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Emil Pesaxov
3,684 PointsIsn't my code much shorter and better?
Here is a snapshot of my workspace. https://w.trhou.se/cgjrka6e3v
Is it really better or the instructor's version is much more suggested. If so, why?
1 Answer
Balazs Peak
46,160 PointsYour code looks great. There is an infinite way to improve a codebase which is getting more complicated than a couple of lines, even more so with larger codebases.
It could have happened that the teacher wanted to be more explicit and step-by-step with the solution, so that beginners would understand more easily, but you went ahead of your time and made something more advanced out of it.
furkan
11,733 Pointsfurkan
11,733 PointsI agree with Balazs Pukli, the instructor very well knows how to refactor code but they go the long way round for simplicity, to show for beginners, really how the code works step by step.
Cheers.