예약어(자바스크립트에서 미리 정의해 놓은 용어)는 식별자로 사용할 수 없다.
자바스크립트 예약어
abstract else instanceof switch boolean enum int synchronized
break export interface this byte extends long throw
case false native throws catch final new transient
char finally null true class float package try
const for private typeof continue function protected var
debugger goto public void default if return volatile
delete implements short while do import static with double in super
아래 있는 단어들도 변수명등으로 사용시
의도치 않은 결과가 나올수 있음
alert hidden outerWidth all history packages anchor image pageXOffset
anchors images pageYOffset area isNaN parent array java parseFloat
assign JavaArray parseInt blur JavaClass password button JavaObject pkcs11
checkbox JavaPackage plugin clearTimeout innerHeight prompt
clientInformation innerWidth prototype close layer radio closed layers reset
confirm length screenX crypto link screenY date location scroll
defaultStatus Math secure document mimeTypes select element name self
elements navigate setTimeout embed navigator status embeds netscape String
escape Number submit eval Object sun event offscreenBuffering taint
fileUpload onblur text focus onerror textarea form onfocus top
forms onload toString frame onunload unescape frames open untaint
frameRate opener valueOf function option window getClass outerHeight
댓글 없음:
댓글 쓰기