JavaScript/予約語
この章では、変数や関数などの名前として使用できない、JavaScriptの予約語の一覧を掲載しています。
予約語の種類
編集ECMAScript の規格では、予約語(Reserved Words)を以下の四種類に分類しています(ES1当時)。
- Keyword
- キーワード
- FutureReservedWord
- 将来のために予約された単語
- NullLiteral
- ヌルリテラル
- null
- BooleanLiteral
- 論理型リテラル
- false と true
単語 | ES1 | ES2 | ES3 | ES5 | ES6/2015 | ES7/2016 | ES8/2017 |
---|---|---|---|---|---|---|---|
abstract | N/A | FRW | ← | N/A | ← | ← | ← |
await | N/A | ← | ← | ← | FRW | ← | K/W |
boolean | N/A | FRW | ← | N/A | ← | ← | ← |
break | K/W | ← | ← | ← | ← | ← | ← |
byte | N/A | FRW | ← | N/A | ← | ← | ← |
case | FRW | ← | K/W | ← | ← | ← | ← |
catch | FRW | ← | K/W | ← | ← | ← | ← |
char | N/A | FRW | ← | N/A | ← | ← | ← |
class | FRW | ← | ← | ← | K/W | ← | ← |
const | FRW | ← | ← | ← | K/W | ← | ← |
continue | K/W | ← | ← | ← | ← | ← | ← |
debugger | FRW | ← | ← | K/W | ← | ← | ← |
default | FRW | ← | K/W | ← | ← | ← | ← |
delete | K/W | ← | ← | ← | ← | ← | ← |
do | FRW | ← | K/W | ← | ← | ← | ← |
double | N/A | FRW | ← | N/A | ← | ← | ← |
else | K/W | ← | ← | ← | ← | ← | ← |
enum | FRW | ← | ← | ← | ← | ← | ← |
export | FRW | ← | ← | ← | K/W | ← | ← |
extends | FRW | ← | ← | ← | K/W | ← | ← |
false | Bool | ← | ← | ← | ← | ← | ← |
final | N/A | FRW | ← | N/A | ← | ← | ← |
finally | FRW | ← | K/W | ← | ← | ← | ← |
for | K/W | ← | ← | ← | ← | ← | ← |
float | N/A | FRW | ← | N/A | ← | ← | ← |
function | K/W | ← | ← | ← | ← | ← | ← |
goto | N/A | FRW | ← | N/A | ← | ← | ← |
if | K/W | ← | ← | ← | ← | ← | ← |
implements | N/A | FRW | ← | S/M | ← | ← | ← |
import | FRW | ← | ← | ← | K/W | ← | ← |
in | K/W | ← | ← | ← | ← | ← | ← |
instanceof | N/A | FRW | K/W | ← | ← | ← | ← |
int | N/A | FRW | ← | N/A | ← | ← | ← |
interface | N/A | FRW | ← | S/M | ← | ← | ← |
let | N/A | ← | ← | S/M | ← | ← | ← |
long | N/A | FRW | ← | N/A | ← | ← | ← |
native | N/A | FRW | ← | N/A | ← | ← | ← |
new | K/W | ← | ← | ← | ← | ← | ← |
null | Null | ← | ← | ← | ← | ← | ← |
package | N/A | FRW | ← | S/M | ← | ← | ← |
private | N/A | FRW | ← | S/M | ← | ← | ← |
protected | N/A | FRW | ← | S/M | ← | ← | ← |
public | N/A | FRW | ← | S/M | ← | ← | ← |
return | K/W | ← | ← | ← | ← | ← | ← |
short | N/A | FRW | ← | N/A | ← | ← | ← |
static | N/A | FRW | ← | S/M | ← | ← | ← |
super | FRW | ← | ← | ← | K/W | ← | ← |
switch | FRW | ← | K/W | ← | ← | ← | ← |
synchronized | N/A | FRW | ← | N/A | ← | ← | ← |
this | K/W | ← | ← | ← | ← | ← | ← |
throw | FRW | ← | K/W | ← | ← | ← | ← |
throws | N/A | FRW | ← | N/A | ← | ← | ← |
transient | N/A | FRW | ← | N/A | ← | ← | ← |
true | Bool | ← | ← | ← | ← | ← | ← |
try | FRW | ← | K/W | ← | ← | ← | ← |
typeof | K/W | ← | ← | ← | ← | ← | ← |
var | K/W | ← | ← | ← | ← | ← | ← |
void | K/W | ← | ← | ← | ← | ← | ← |
volatile | N/A | FRW | ← | N/A | ← | ← | ← |
while | K/W | ← | ← | ← | ← | ← | ← |
with | K/W | ← | ← | ← | ← | ← | ← |
yield | N/A | ← | ← | S/M | K/W | ← | ← |
- N/A
- 予約語ではない
- FRW
- Future Reserved Word : 将来のために予約された単語
- K/W
- Keyword : キーワード
- S/M
- Strict mode : Strict モードでのみ将来のために予約された単語として識別子には使用できない。
- ←
- 左に同じ