Browsing: find duplicate chararcter in Java Script