Complete the code to declare a variable inside a module scope.
const [1] = 10; console.log(value);
The variable value is declared with const inside the module, so it is scoped to this module only.
Complete the code to export a function from a module.
export default function [1]() { return 'Hello from module'; }
The function greet is exported so it can be used outside this module.
Fix the error in the code by completing the import statement correctly.
import [1] from './module.js'; console.log(greet());
The import must match the exported function name greet from the module.
Fill both blanks to create a private variable and a public function accessing it.
const [1] = 42; export function getValue() { return [2]; }
The variable secretNumber is private to the module, and the exported function getValue returns its value.
Fill all three blanks to export a constant, import it, and log its value.
export const [1] = 3.14; import { [2] } from './constants.js'; console.log([3]);
The constant PI is exported, imported, and logged correctly.
