Below is a trace of the call repeatDigits(-348): repeatDigits(-348) is < 0, so execute first branch compute repeatDigits(-n), which is repeatDigits(348) | not < 0, not < 10, so execute third branch | compute repeatDigits(34) | | not < 0, not < 10, so execute third branch | | compute repeatDigits(3) | | | not < 0, but is < 10, so execute second branch | | | return n * 11 (33) | | compute repeatDigits(4) | | | not < 0, but is < 10, so execute second branch | | | return n * 11 (44) | | return first * 100 + second (33 * 100 + 44 = 3344) | compute repeatDigits(8) | | not < 0, but is < 10, so execute second branch | | return n * 11 (88) | return first * 100 + second (3344 * 100 + 88 = 334488) return the negation of that result (-334488)