Checks if character has previously occurred or not if not then add it to the minimized String ' mstr '
if ( flagchar [ ch . charCodeAt ( 0 ) - 97 ] == 0 ) { mstr = mstr + ch ; flagchar [ ch . charCodeAt ( 0 ) - 97 ] = 1 ; } }