https://www.w3schools.com/js/tryit.asp?filename=tryjs_datatypes_undefined_3 ' Differenza tra indefinita e null ' undefinede nullsono di valore uguale ma diverso nel tipo: ' typeof undefined // undefined ' typeof null // object ' null === undefined // false ' null == undefined // true <!DOCTYPE html> <html> <body> <h2>JavaScript</h2> <p>Undefined and null are equal in value but different in type:</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = typeof undefined + "<br>" + typeof null + "<br><br>" + (null === undefined) + "<br>" + (null == undefined); </script> </body> </html> |