에러노트

자바스크립트 오류를 잡아보자...(SyntaxError, TypeError, ReferenceError)

xhakxh135 2023. 9. 8. 14:55
반응형
SMALL

평소에 종종 보게되는 에러들에 대해서 다시 한번 짚고가보자...^^...쉣

 

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors

 

JavaScript error reference - JavaScript | MDN

Below, you'll find a list of errors which are thrown by JavaScript. These errors can be a helpful debugging aid, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. Each error is an o

developer.mozilla.org

MDN에서도 친절하게  설명을 잘 해주고 있다만...

 

오류 유형에는 대표적으로 7가지 정도가 있다.

  • SyntaxError
  • TypeError
  • EvalError
  • RangeError
  • ReferenceError
  • SyntaxError
  • URIError

 

SyntaxError 구문 오류

오타, 쉼표, 따옴표, 괄호 등 기호 실수..

 

 

Reference Error

현재 범위에서 존재하지 않거나 초기화 되지 않은 변수를 참조 했을 때...

(정의하지않은것을 호출하려고 한다던지)

 

TypeError

변수나 인자가 참조하고 있는 인스턴스를 사용하지 못할때...

 

반응형
LIST