When comparing Udacity vs exercism.org, the Slant community recommends exercism.org for most people. In the question“What are the best websites to learn to code?” exercism.org is ranked 2nd while Udacity is ranked 5th. The most important reason people chose exercism.org is:
Rather than merely test for code correctness, Exercism uses peer review to improve general programming techniques. Users are encouraged to comment on others' solutions, and refine their own based on feedback.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Courses taught by industry professionals
Pro All courses are self-paced
Courses are always made available which means there is no waiting for the specific course you want to run. You can work through the courses as fast or as slow as you want.
Pro Offers Nanodegrees
Udacity offers a few different Nanodegrees which provide access to various different courses, project reviews and coaching support for $200/month.
Current options include Front End Web Developer, Data Analyst and Android Developer. See the full list here.
Pro Courses are easy to understand
Pro Actual feedback on coding projects
You get actual feedback from developers on your code, which is useful. Yes having your sites/apps do what it is supposed to do is important, but you need feedback to learn industry standards/best practices and other gotchas that are much harder to learn on your own.
Pro Language that is easy to understand
Courses are super easy to follow, even for super dummies.
Pro Worth the investment

Pro Human review and feedback
Rather than merely test for code correctness, Exercism uses peer review to improve general programming techniques. Users are encouraged to comment on others' solutions, and refine their own based on feedback.

Pro Practice with production tools
Unlike many code practice websites, Exercism requires the user to develop and test entirely offline, submitting only the finished code. This promotes familiarity with essential tools and workflow, not just the bare language.
Cons
Con Nanodegrees are expensive
Udacity is quite expensive at $200/month if you want to do a nanodegree.

Con Custom commandline client
Exercism requires using a CLI utility to fetch and submit exercises. This is inconvenient compared to web-only alternatives, and poses an additional barrier to entry for some users.
