How to import variable in javascript file from another javascript file in javascript Project.

preview_player
Показать описание
How to import variable in javascript file from another javascript file in javascript Project.

Рекомендации по теме
Комментарии
Автор

not working. : console says: Cannot use import statement outside module.

utube
Автор

Hello thanks for the video. can you please help me. i want to do this but when i type export {variableName]; it cancels the function of the same script where i use the variable

Qtaroo
Автор

Thanks for video. I was still getting errors even after adding type="module" to my html
my import statement was missing the .js at the end of the file string. It worked after specifying the complete filename
import { accounts } from "./config.js";

citizen
Автор

Please, how can I do this in React js?

KingsleyOkeze