I am trying to define constants in one file and use them in another.
I know this wont work but what is the correct way to do this?
// const.js
export const GREETING = `Hello, ${name}`;
// displayGreeting.js
import { GREETING } from './const';
def displayGreeting(name) {
return GREETING
}
>>> displayGreeting('barry')
>>> Hello, barry