Skip to content
  • มาตรฐานใหม่สำหรับ JavaScript
  • ใช้ import เพื่อนำเข้า และ export เพื่อส่งออก
  • สนับสนุนการโหลดแบบ asynchronous
  • ใช้งานได้ทั้งในเบราว์เซอร์และ Node.js (ตั้งแต่เวอร์ชันใหม่ๆ)
js
// ส่งออก
export function function1() { /* ... */ }
export function function2() { /* ... */ }

// นำเข้า
import { function1, function2 } from './module.js';

Released under the MIT License