This function returns true if contents of arr1 [ ] and arr2 [ ] are same , otherwise false .
function compare ( arr1 , arr2 ) { for ( let i = 0 ; i < ALL_CHARS ; i ++ ) if ( arr1 [ i ] != arr2 [ i ] ) return false ; return true ; }