If not prime , copy the largest prime less than current number
if ( p [ N [ i ] - ' ' ] == 0 && prevprime [ N [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] != 0 ) { ans [ ns ++ ] = String . fromCharCode ( prevprime [ N [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] + ' ' . charCodeAt ( 0 ) ) ; small = 1 ; }