Complete the code to import the default export from a module.
import [1] from './mathUtils.js';
The default export can be imported with any name you choose. Here, sum is used as the local name.
Complete the code to import a named export called 'multiply' from a module.
import { [1] } from './mathUtils.js';
Named exports must be imported using curly braces with the exact exported name.
Fix the error in the import statement to correctly import all named exports as an object.
import * as [1] from './mathUtils.js';
* as syntaxUsing * as math imports all named exports under the object math.
Fill both blanks to export a named function and a constant from a module.
export function [1]() { return 42; } export const [2] = 'hello';
The function is named getAnswer and the constant is named message.
Fill all three blanks to create a module that exports a default function and two named constants.
export default function [1]() { return [2] + [3]; } export const pi = 3.14; export const e = 2.71;
The default exported function is named sum and it returns the sum of pi and e.