Answers for "js export as name"

1

js export as name

//2 ways: either export with alias or import with alias  
//impor
import { grettings as welsomeMessage } from './library.js'
// Or export
let grettings = "Welcome to Noob Learner";
export { grettings as welsomeMessage };


// export feature declared earlier as default
export { myFunction as default };

// export individual features as default
export default function () { ... }
export default class { .. }

// each export overwrites the previous one
Posted by: Guest on August-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language