I'm trying to validate file extensions in javascript. When I use just one argument in my if statement like this
if(ext!='png' ){ bodyAppend("err","Incorrect file type"); bodyAppend("br",""); } the code works. But if I add an or statement like this
if(ext!='png' || ext!='jpg'){ bodyAppend("err","Incorrect file type"); bodyAppend("br",""); } the code does not work and always returns true.