モダンなフロントエンドの現場では、ES2015以降のJavaScriptの構文を使うことがほとんどです。たとえば次に示すコードでは、ES2015で導入されたアロー関数やES Modulesを使っています。 ▼ index.js import { myFunction } from "./myFunction.js"; const todayWeather = myFunction(14); document .querySelector("#weather") .textContent = todayWeather; ▼ myFunction.js export const myFunction = temperature => { return `岡山県の気温は${temperature}度です`; }; ES2015以降の構文はブラウザーによっては対応していないこともあるため、Babe
![Parcel入門 - ES2015+の導入方法 - ICS MEDIA](https://cdn-ak-scissors.b.st-hatena.com/image/square/2485484fe6d54b9f51e6c48f32550dcf23f0486c/height=288;version=1;width=512/https%3A%2F%2Fics.media%2Fentry%2F190405%2Fimages%2Feyecatch_percel_es2015.png)