Loop to find out the differences between consecutive elements and storing them in the set
for ( var i = 1 ; i < s . length ; i ++ ) { difference . add ( s [ i ] . charCodeAt ( 0 ) - s [ i - 1 ] . charCodeAt ( 0 ) ) ; }