---
title: 标识符
slug: Glossary/Identifier
tags:
  - 词汇表
translation_of: Glossary/Identifier
---
<p>代码中用来标识<strong>{{glossary("variable","变量")}}、{{glossary("function","函数")}}、或{{glossary("property","属性")}}</strong>的字符序列。</p>

<p>在{{glossary("JavaScript")}}中,标识符只能包含字母或数字或下划线(“_”)或美元符号(“$”),且不能以数字开头。标识符与字符串不同之处在于字符串是数据,而标识符是代码的一部分。在 JavaScript 中,无法将标识符转换为字符串,但有时可以将字符串解析为标识符。</p>

<h2 id="了解更多">了解更多</h2>

<h3 id="基本知识">基本知识</h3>

<ul>
 <li>{{interwiki("wikipedia", "Identifier#In_computer_science", "Identifier")}} on Wikipedia</li>
</ul>