Checking condition for Anagram
tempArray1 . sort ( ) ; tempArray2 . sort ( ) ; let copy_S1 = tempArray1 . join ( " " ) ; let copy_S2 = tempArray2 . join ( " " ) ; if ( copy_S1 != copy_S2 ) { return false ; } for ( let i = 1 ; i < n ; i ++ ) {