565 B
565 B
title | localeTitle |
---|---|
Use * to Import Everything from a File | 使用*从文件导入所有内容 |
使用*从文件导入所有内容
如果要从文件导入所有可能的内容,则使用ES6提供的import * as _ from
语法。这正是你在这次挑战中所做的任务!
提示1:
填写空白: import * as objName from "file-name"
。您可以使用objName
,但您的文件名应为capitalize_strings
。
剧透警报 - 提前解决!
解:
"use strict";
import * as str from "capitalize_strings";