Fork me on GitHub

JavaScript 开发技巧 || 返回有效值

<script type="text/javascript">
var objOne = undefined || "" || null || 1 || new Date();
var objTwo = new Date();
var objThree = objOne || objTwo;
alert(objOne.toString());
</script>

posted @ 2015-04-30 13:25  Terry√  阅读(209)  评论(0编辑  收藏  举报