Simple and clean approach 
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```javascript []
/**
 * @param {string} s
 * @return {boolean}
 */
var hasSameDigits = function(s) {
    let i =0
    let currentS = ''
    while(s.length > 2){
        let sum = (Number(s[i]) + (Number(s[i+1]) || 0)) % 10
        currentS += sum
        if( i === s.length - 2){
            i = 0
            s = currentS
            currentS = ''
        } else {
            i += 1
        }
    }

    return s[0] === s[1]
};
```
['JavaScript']