(Ad, please don’t block.)

Quizzes » Modules

1. Exporting (1/2)

Check all correct statements:

2. Exporting (2/2)

Check all correct statements:

Which one is correct?

3. Importing (1/3)

External file lib1.js:

export default 'a';
export const lib1 = 'b';
export function toString() {
  return 'lib1';
}

Code:

import {lib1} from './lib1.js';
const result = String(lib1);

What happens?

4. Importing (2/3)

External file lib2.js:

export default 'a';
export const lib2 = 'b';
export function toString() {
  return 'lib2';
}

Code:

import lib2 from './lib2.js';
const result = String(lib2);

What happens?

5. Importing (3/3)

External file lib3.js:

export default 'a';
export const lib3 = 'b';
export function toString() {
  return 'lib3';
}

Code:

import * as lib3 from './lib3.js';
const result = String(lib3);

What happens?


Correct answers: 0 out of 0