, , . , ECMAScript , . -, . ,
break
do
instanceof
typeof
case
else
new
var
catch
finally
return
void
continue
for
switch
while
debugger
function
this
with
default
if
throwdelete
in
try
, . :)
class
enum
extends
super
const
export
import
To be safe and not need to look for specifications every time, I would say that it is better to specify your identifiers. To really see the problem, check them out in Safari, at least in version 4.0.4, when you use any of these keywords as identifiers. For example, try the following:
var class = "my class";
Will not work in a simple declaration or inside a declaration of an object of type JSON:
var myObject = {
goodProperty: "this works",
class: "gimmeh the errarz codez!",
};
source
share