Q:

check out type of element，but i don't understand the 'return !!e'?

code 
    <div id = 'd' class="dd">div test type of element ...</div> 
    <script type="text/javascript">
        function isElement(e){
            console.log(e);
            console.log(!!e);
            return !!e && e.nodeType === 1;
        }
        console.log(isElement(document.getElementById('d')));
    </script>

i just want to check out type of element, but the return values that confuse me.
the meaning of  '!!e'??
why should i use '!!e'?

A:

Double logic not !! is popular technic to cast value from falsy or truthy to boolean false or true value. 

