function getInternetExplorerVersion () {
  if (_ieVersion === -1) {
    let rv = -1 // Return value assumes failure.
    if (typeof navigator !== 'undefined' && navigator.appName === 'Microsoft Internet Explorer') {
      const ua = navigator.userAgent
      const re = /MSIE ([0-9]+[.0-9]+)/
      if (re.exec(ua) != null) {
        rv = parseFloat(RegExp.$1)
      }
    }

    _ieVersion = rv
  }

  return _ieVersion
}
Returns the version of Internet Explorer or a -1
(indicating the use of another browser).
Source: http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx
@return {Number} Internet Explorer version, or -1 in case of an other browser