how to write this in javascript:

if (file == any element end with .HTML) {

do somthing

}



thanks