1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "UTF-8">5 <title></title>6 <Scripttype= "Text/javascript">7 8 /*9 * IdentifiersTen *-All that can be named by us in JS can be called identifiers. One *-for example: variable names, function names, property names belong to identifiers A *-The following rules apply when naming an identifier: - * 1. Identifiers can contain letters, numbers, _, $ - * 2. Identifiers cannot begin with a number the * 3. Identifiers cannot be keywords or reserved words in ES - * 4. The identifier is usually used in the hump naming method - *-Initial letter lowercase, first letter of each word capitalized, remaining letter lowercase - * HelloWorld xxxyyyzzz + * - *-JS underlying save identifier is actually the Unicode encoding used, + * So theoretically, all the content contained in the Utf-8 can be used as an identifier A */ at /* - var if = 123; - - Console.log (if); if is a keyword, error: "Uncaught syntaxerror:unexpected token if" - - */ in - to //don't use it that way. + varhoe wo Day copse= 789; - console.log (Hoe wo Day copse); the * $ </Script>Panax Notoginseng </Head> - <Body> the </Body> + </HTML>
JS Base _ Identifier