<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width"/> <meta charset="utf-8"> <title>object and this</title> <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> </head> <body> <h1>Arrow Functions</h1> <p>Open the console</p> <script type="module">
module → 최신 JS 모듈 (import/export 가능)
text/javascript / javascript → 일반 JS (기본값, 옛날 방식)
text/babel → Babel로 변환해야 실행되는 JS/JSX (React에서 자주 사용)
<script type="module">에서 **최상위 스코프의 this는 undefined (만약 type="text/javascript"였다면 전역 객체인 window가 됨)