function getInternetExplorerVersion () {
  var version = -1;
  var userAgent = navigator.userAgent;
  var re;
  if (navigator.appName === 'Microsoft Internet Explorer') {
    re = new RegExp('MSIE ([0-9]{1,}[\\.0-9]{0,})');
    if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }
  } else if (navigator.appName === 'Netscape') {
    re = new RegExp('Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})');
    if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }
  }
  return version;
}
function getInternetExplorerVersion () {
  var version = -1;
  var userAgent = navigator.userAgent;
  var re;
  if (navigator.appName === 'Microsoft Internet Explorer') {
    re = new RegExp('MSIE ([0-9]{1,}[\\.0-9]{0,})');
    if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }
  } else if (navigator.appName === 'Netscape') {
    re = new RegExp('Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})');
    if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }
  }
  return version;
}
function getInternetExplorerVersion ( ) { var version = - 1 ; var userAgent = navigator . userAgent ; var re ; if ( navigator . appName === 'Microsoft Internet Explorer' ) { re = new RegExp ( 'MSIE ([0-9]{1,}[\\.0-9]{0,})' ) ; if ( re . exec ( userAgent ) != null ) { version = parseFloat ( RegExp . $1 ) ; } } else if ( navigator . appName === 'Netscape' ) { re = new RegExp ( 'Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})' ) ; if ( re . exec ( userAgent ) != null ) { version = parseFloat ( RegExp . $1 ) ; } } return version ; }
https://stackoverflow.com/a/17907562
https : // stackoverflow . com / a / 17907562
Get the version of Internet Explorer