Camel标记法:首字母小写,接下来的单词都以大写字母开头。例如:var **m**y**T**est**V**alue=0,**m**y**S**econd**T**est**V**alue="hi"
;
Pascal标记法:首字母大写,接下来的单词都以大写字母开头。例如:var **M**y**T**est**V**alue=0,**M**y**S**econd**T**est**V**alue="hi"
;
匈牙利类型标记法:在以Pascal标记法命名的变量前附加一个小写字母(或小写字母序列),说明该变量的类型。例如,i表示整数,s表示字符串,如下面所示:
1 | 类型:数组 前缀:a 示例:aValues |
ECMA-262 定义的关键字为:
1 | break case catch continue default delete do else finally for function if in instanceof new return switch this throw try typeof var void while with |
ECMA-262第3版中保留字为:
1 | abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile |
原始值(primitive value)是存储在栈(stack)中的简单数据段,也就是说,它们的值直接存储在变量访问的位置。
引用值(reference value)是存储在堆(heap)中的对象,也就是说,存储在变量处的值是一个指针(point),指向存储对象的内存处。