compare strings and get end difference

const A = "The quick brown fox"

const B = "The quick brown fox jumps over the lazy dog."

const diff = (diffMe, diffBy) => diffMe.split(diffBy).join('')

const C = diff(B, A)

console.log(C) // jumps over the lazy dog.

Leave a Comment