• 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. 型別
  • Change language
  • View in English

Table of contents

  • 深入了解

型別

型別(或資料型別)是能決定 value (en-US) 該存為何種類型的特性:例如 JavaScript 的 Boolean (en-US) 只能存為 true/false 兩者其一、而字串(String)能存為文字字串、Number 則能存城任何類型的數字……等等。

型別也能決定哪些操作是有效的:例如說整數(integer)可以與整數相乘,但不能與字串相乘。

深入了解

基本知識

  • 維基百科的資料型別
  • JavaScript 的資料型別

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 19, 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