1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
Code the alternative to the following code. | const num = 12; export { num }; |
export const num; | exportconstnum; |
Code the alternative to the following code. | export const num = 12; | const num = 12; export { num }; |
constnum=12;[\r\n]export{num}; |
Fill in the blank so the importing script can import all the pieces of data without naming them. | export _______ { num, showNum, anAnimal }; | default | default |
Code the last line of a module that allows the importing script to import the variable population without naming it. | export default { population }; | exportdefault{population}; | |
Code the last line of module that allows the importing script to import a function without naming it. Make up the name of the function. | export default { doSomething }; | exportdefault{[a-z_$][a-zA-Z0-9_$]*}; | |
The module at "./mod1.js" has exported data using the default keyword. Code the import statement using someData as the variable name. | import someData from "./mod1.js"; | importsomeDatafrom•\.\/mod1\.js•; | |
The module at "./mod1.js" has exported data using the default keyword. The importing script has assigned the imported data to the variable importedStuff. An imported function is named doSomething. Call the function. | importedStuff.doSomething(); | importedStuff\.doSomething\(\); | |
The module at "./mod1.js" has exported a function using the default keyword. Code the import statement. Make up the variable name and the function name. Call the function. | import importedStuff from "./mod1.js"; importedStuff.doSomething(); |
import([a-z_$][a-zA-Z0-9_$]*)from•\.\/mod1\.js•;[\r\n]\1\.[a-z_$][a-zA-Z0-9_$]*\(\); | |
|
|||
|