Finding Absolute Difference Between Element Sum and Digit Sum
You are given an array nums containing positive integers. The "element sum" is the sum of all the elements in nums, while the "digit sum" is the sum of all the digits that appear in nums.
Your task is to calculate and print the absolute difference between the element sum and the digit sum of nums.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)