• Skip to main content
  • Skip to search
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. 术语表
  2. undefined
  • Change language
  • View in English

Table of contents

  • 例子
  • 更多

undefined

一个声明未定义的变量的初始值,或没有实际参数的形式参数。

例子

 

var x; //创建一个变量,但并没有赋值

console.log("X的值是", x)  //返回X的值是undefined

 

更多

基本知识

  • Undefined value on Wikipedia

技术参考

  • JavaScript data types and data structures

Found a problem with this page?

  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Apr 14, 2021, by MDN contributors

Change your language
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

Mozilla

© 2005-2021 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies