<script>
var a = null || 2;
var a = false || 2;
var a = undefined || 2;
console.log(a); 输出:2
</script>