javascript get only 10 characters from string