Define an array with those chars and simply search in the array. One way to do that is the following:
var charsToSearch = [".", ",", "#", "$", ";", ":"];
var theChar = str.charAt(i); /* Wherever str and i comes from */
if (charsToSearch.indexOf(theChar) != -1) {
/* Code here, the char has been found. */
}