【JavaScript】JavaScriptをmodule化する方法

<!DOCTYPE html>
<html>
  <head>
    <title>Parcel Sandbox</title>
    <meta charset="UTF-8" />
  </head>

  <body>
    <script type="module">//module化
      const name = "AAA";
    </script>
    <script type="module">//module化
      const name = "BBB";
      document.body.textContent = name;
    </script>
  </body>
</html>
(Visited 44 times, 1 visits today)

コメント

  1. Darin Chesser より:

    F*ckin’ amazing things here. I am very glad to see your article. Thanks a lot and i’m looking forward to contact you. Will you kindly drop me a e-mail?

タイトルとURLをコピーしました