首页 > Web开发 > 详细

JS - Lexical Structure

时间:2016-12-21 20:45:38      阅读:289      评论:0      收藏:0      [点我收藏+]

1.

   JS programs are programed by Unicode character.

1.1

  JS programs are case-sensitive.

  HTML--non-case-sensitive.

  XHTML--case-sensitive.

  When objects and properties in JS are same to the tags and properties in HTML, the JS must be lowercase while HTML can be itsself.

1.2

  JS will ignore the space between tokens. At most time, JS will ignore newlines.

1.3 

  JS contains special characters to express special symbol. Use "\n" as prefix. Just like "\nu0072".

1.4

  Unicode had defined the first choice of code formats for every character.

2.

  JS supports two kinds of notes:

  "//" for a line

  "/*----*/" for a block

3.

  Literals: "Hello World", 12, null, ‘javascript‘

4.

  Tokens of JS must begin with letter, _, or $.

  Tokens of JS also support all character in Unicode.

  JS had defined some reserved words. Them cannot be the token.

5.

  When the sentence has exclusive line, it can end without ";".

  This is a bad habit.

 

JS - Lexical Structure

原文:http://www.cnblogs.com/zawjdbb/p/6208762.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!