toUpperCase()
on all the input values to make alphabet comparison easier. Next, I compared the two strings to find the all common characters (except the common punctuations ie. period, commas). Then, I placed each letter in span
using the for
loop, assigning the .slashed
class to all the common + duplicated letters.