Possible Duplicate:
Check variable equality against a list of values
Javascript: Comparing SINGLE Value Against MULTIPLE Values with OR Operands
First of all I am new to javascript side. Please let me know is there any simple way of formating the below code.
if( fileName== 'doc' || fileName=='docx' || fileName=='xls' || fileName=='xlsx' || fileName=='ppt' || fileName=='pdf' ){
Do something
} else{
Do something
}