// math.js - Named exports
export const PI = 3.14159;
export const E = 2.71828;
export function add(a, b) {
return a + b;
// Array destructuring
const numbers = [1, 2, 3, 4, 5];
const [first, second] = numbers;
console.log(first, second); // 1 2
// Skip elements
// ES6 Class syntax
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}