一路繁花似锦绣前程
失败的越多,成功才越有价值

导航

 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>study</title>
</head>
<body>
<script>
  window.onload = function () {
    console.log(typeof 1)
    console.log(typeof "1")
    console.log(typeof true)
    console.log(Array.isArray([1, 2, 3]))
    console.log(Object.prototype.toString.call(new Date()))
    console.log(Object.prototype.toString.call(Array()))
    console.log(Object.prototype.toString.call(function () {
    }))
    console.log(typeof null)
    console.log(typeof undefined)
    console.log(isNaN(NaN))
    console.log(Number.isNaN(NaN))

    try {
      if (new Date() instanceof Date) {
        throw new Error("try catch测试")
      }
    } catch (e) {
      console.log(e)
      console.warn(e)
      console.error(e)
    }

    function Person(a, b, c) {
      //打印Arguments对象
      console.log(arguments)
    }

    Person(1, 2, 3)
    //打印函数对象
    console.dir(Person)

    var jsonObj = {
      name: "mengmeiqi",
      age: 18
    }
    for (var key in jsonObj) {
      console.log(key + ":" + jsonObj[key])
    }
  }
</script>
</body>
</html>
posted on 2020-08-27 12:05  一路繁花似锦绣前程  阅读(229)  评论(0编辑  收藏  举报