function getExt(filename){
    var splitted = filename.split('.');
    if(splitted.length === 1) return ''; // file has no extension
    return splitted[splitted.length - 1]; // get file extension
}
function getExt(filename){
    var splitted = filename.split('.');
    if(splitted.length === 1) return ''; 
    return splitted[splitted.length - 1]; 
}
function getExt ( filename ) { var splitted = filename . split ( '.' ) ; if ( splitted . length === 1 ) return '' ; // file has no extension return splitted [ splitted . length - 1 ] ; // get file extension }
helper - extract file extension from file name
@param {String} filename
@returns {String}  file extension
helper - extract file extension from file name