Solve this with as few characters as possible in any language! Go!

Subscribers:
2,520,000
Published on ● Video Link: https://www.youtube.com/watch?v=2iH-c6HXk-Y



Duration: 0:00
14,120 views
152


Can you write the shortest possible function to sum all digits in a positive integer? While the logic is straightforward, the challenge lies in leveraging your language's features for maximum brevity. The baseline JavaScript solution clocks in at 85 characters, but there's definitely room for improvement. What creative approaches can you use? Share your solutions and tell us which language you think offers the best approach!
Check out the video and share your thoughts!

Subscribe to Google for Developers → https://goo.gle/developers

Speakers: M.E. Francis