Detecção de Javascript Internet Explorer 11

<script type="text/javascript">
!(window.ActiveXObject) && "ActiveXObject"
function isIE11(){
return !!navigator.userAgent.match(/Trident.*rv[ :]*11./);
}
</script>