Complete the code to export the function as the default export.
export default function greet() {
return "Hello!";
}The keyword default is used to export a single default export from a module.
Complete the code to import the default export from the module.
import [1] from './greet'; console.log([1]());
When importing a default export, you use a simple name without braces.
Fix the error in importing a named export from the module.
[1]
console.log(greet());Named exports must be imported using curly braces around the exact exported name.
Fill both blanks to export two named functions from the module.
export function [1]() { return 'Hello'; } export function [2]() { return 'Goodbye'; }
Named exports can be multiple functions with their own names.
Fill all three blanks to import a default export and two named exports from the module.
import [1], { [2], [3] } from './messages'; console.log([1]()); console.log([2]()); console.log([3]());
You can import a default export with a name, and named exports inside curly braces.
