concept import in category javascript

This is an excerpt from Manning's book Deep Learning with JavaScript: Neural networks in TensorFlow.js.
The JavaScript code will usually be modularized into several files in order to promote good readability and style. In the case of this Boston-housing project, code dealing with updating visual elements resides in ui.js, and code for downloading the data is in data.js. Both are referenced via import statements from index.js.
import * as tf from '@tensorflow/tfjs'; import '@tensorflow/tfjs-react-native';

This is an excerpt from Manning's book Secrets of the JavaScript Ninja, Second Edition.
Built-in modules are a part of the ES6 standard. As you’ll soon see, the ES6 module syntax includes additional semantics and keywords (such as the export and import keywords) that aren’t supported by current browsers. If we want to use modules today, we have to transpile our module code with Traceur (https://github.com/google/traceur-compiler), Babel (http://babeljs.io/), or TypeScript (www.typescriptlang.org/). We also can use the SystemJS library (https://github.com/systemjs/systemjs), which provides support for loading all currently available module standards: AMD, CommonJS, and even ES6 modules. You can find instructions on how to use SystemJS in the project’s repository (https://github.com/systemjs/systemjs).
Regardless of how we’ve exported identifiers of a certain module, if we need to import them into another module, we have to use the import keyword, as in the following example.
Listing 11.7. Importing from the Ninja.js module
import { message, sayHiToNinja} from "Ninja.js"; #A assert(message === "Hello", #B "We can access the imported variable"); #B assert(sayHiToNinja() === "Hello Yoshi", #B "We can say hi to Yoshi from outside the module"); #B assert(typeof ninja === "undefined", #C "But we cannot access Yoshi directly"); #C #A - Uses the import keyword to import an identifier binding from a module #B - We can now access the imported variable and call the imported function. #C - We can’t access not-exported module variables directly. !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":48}]]"} !@%STYLE%@!