var x= new Number(); alert(x)//0 x=new Object(); alert(JSON.stringify(x)) //{} x=new Boolean(); alert(x)//false x=new RegExp(); alert(x)// /(?:)/ x=new String(); alert(x=="")// true
<script> var x; alert(x)//undefined alert(x===undefined)//true //聲明var 沒有給類型或者值 還是undefined !!!! </script>