function solution(inputString) { let firstDigit = inputString.match(/d/); return firstDigit ? firstDigit[0] : '0'; }