export function greetPerson(name) {
...
}
import { greet } from '/.greet.js';
// importing greetPerson from greet.js file
import { greetPerson } from './greet.js';
// using greetPerson() defined in greet.js
let displayName = greetPerson('Jack');
console.log(displayName); // Hello Jack
// exporting a function
export function greetPerson(name) {
return `Hello ${name}`;
}
export const name = "Jesse";
export const age = 40;