1, ECMAScript 关键字
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
-------
把关键字作为变量名,或者函数名的话 可能会的到 Identifier Expected 这样的错误.
2, 保留字
abstract
boolean
type
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
---
将保留字做变量名, 不会出错, 但是当浏览器实现了该保留字之后,就会报错了, 所以还是不要用了 !!
本文详细列举了ECMAScript中的关键字与保留字,并强调了避免将其用作变量名或函数名的重要性。
154

被折叠的 条评论
为什么被折叠?



