text: map store frequency of each character
code: let m1 = new Map ( ) ; let m2 = new Map ( ) ; for ( let i = 0 ; i < s1 . length ; i ++ ) { if ( m1 [ s1 [ i ] ] ) m1 [ s1 [ i ] ] ++ ; else m1 [ s1 [ i ] ] = 1 } for ( let i = 0 ; i < s2 . length ; i ++ ) { if ( m2 [ s2 [ i ] ] ) m2 [ s2 [ i ] ] ++ ; else m2 [ s2 [ i ] ] = 1 } for ( var it in m1 ) {