JavaScript Modules with Import/Export Syntax (ES6) - JavaScript Tutorial

JavaScript Modules with Import/Export Syntax (ES6) - JavaScript Tutorial

dcode

4 года назад

130,013 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Akbar-ux3bc
@Akbar-ux3bc - 30.11.2023 07:53

Well explained.

Ответить
@Speed-TV
@Speed-TV - 18.11.2023 05:22

such clear tutorial!

Ответить
@rachidahireche4165
@rachidahireche4165 - 01.11.2023 19:21

The explanation in this video is amazing, thank you

Ответить
@maryampi6055
@maryampi6055 - 06.08.2023 20:25

I created a chrome extension. I want to add an encryption that is gonna work on a web page and I need to use CryptoJS library but whenever I do import CryptoJS, I get an error: Uncaught SyntaxError: Cannot use import statement outside a modul

Ответить
@orashusedmund7675
@orashusedmund7675 - 17.06.2023 08:15

thank you sir

Ответить
@SabaFesvianidze
@SabaFesvianidze - 13.02.2023 11:30

very easy explain bro!!

Ответить
@gerardpalagalofre8119
@gerardpalagalofre8119 - 15.01.2023 22:30

Perfectly clear, well explained. Thank you :)

Ответить
@jahmiel1945
@jahmiel1945 - 14.12.2022 16:00

i was struggling with js modules, as soon as i watched this video i figured out my mistake for not including the .js extention. Thanks to dcode, i now uderstood why its was giving mw errors

Ответить
@Tony.Nguyen137
@Tony.Nguyen137 - 29.11.2022 02:23

But I could just use another tag <script src=„utils.js“> and I would have access to the functions. And I woudnt even need the import export tags.

Ответить
@cm3462
@cm3462 - 09.10.2022 07:29

oof. so good.

Ответить
@fleruvius391
@fleruvius391 - 04.10.2022 00:31

amazing thank you

Ответить
@fireworks6795
@fireworks6795 - 07.09.2022 13:12

Ответить
@mihaipascu4975
@mihaipascu4975 - 02.09.2022 23:56

Very usefull and cleary explained! Merci !!!

Ответить
@JoseGonzalez-dw3jk
@JoseGonzalez-dw3jk - 14.08.2022 23:31

muy buen video, muy claro, me sirvio mucho :)

Ответить
@reynandelizo1480
@reynandelizo1480 - 14.08.2022 23:31

I experience ,,,,,error: Uncaught SyntaxError: Cannot use import statement outside a module ,,,,,, I have a error in my console even I put type:module inside a script tag

Ответить
@lorenzo7098
@lorenzo7098 - 05.08.2022 20:55

how to use fs with your architecture? I get an error when I do this
because I don't understand why I can't do this, when I also use import ES6 and added with npm the fs package

Ответить
@sher.5027
@sher.5027 - 23.07.2022 19:26

Nice. Video. Commenting her to tell the universe that I understood your video. Crystal Clear Concept. Thankyou for the upload.

Ответить
@rikkarth_
@rikkarth_ - 21.07.2022 23:55

Excellent explainer. Thank you very much.

Ответить
@mbs2488
@mbs2488 - 14.07.2022 18:47

Excelente ! Muito bem explicado ! ! Parabéns pelos vídeos ! ! !

Ответить
@piesieyeboah5307
@piesieyeboah5307 - 03.07.2022 20:44

great content

Ответить
@deniskomarov189
@deniskomarov189 - 26.06.2022 01:16

Been trying to get these imports to work for a long time now. Thanks so much!

Ответить
@aishachaidez7205
@aishachaidez7205 - 20.06.2022 04:02

Thank you so much! But out of curiosity can you export <span>class</span>from HTML?

Ответить
@rabiaismailrabiaismail5129
@rabiaismailrabiaismail5129 - 07.06.2022 18:00

Good Explanation!
I try it but it is not working. I mean the chrome didn't produce any result.
Any other way...?

Ответить
@jbc5126
@jbc5126 - 28.05.2022 03:04

is there a way around having to put 'export' in front of every statement in a js file? i find this extremely tedious. Can I just export everything in a js file without mucking up the code with duplicate export calls all down the page?

Ответить
@Mzingeli79
@Mzingeli79 - 07.05.2022 20:34

I get a cors error please help🥲

Ответить
@sseruwagifaishar1134
@sseruwagifaishar1134 - 04.05.2022 01:07

when I use the same language when console log ,it indict error as ( i is not defined)
why showing i not defined when console.log?

Ответить
@dwarslopers
@dwarslopers - 16.04.2022 18:39

Wow. Exzellent Explanation!

Ответить
@kingofstride
@kingofstride - 06.04.2022 09:20

Thank you so much; great video! Cheers from Sweden 🇸🇪😊

Ответить
@draa932
@draa932 - 30.03.2022 18:39

when you export an entire class with multiple functions inside (say - class test1) and import from another class(say test2) like this --- import './test1.js'; without using the as keyword - how do you access the functions of test1 from test2 ? thanks!

Ответить
@sadface
@sadface - 28.03.2022 19:42

I have been putting everything in the same JS file for years... never knew this was possible in JS. This changes everything.

Ответить
@pjf7044
@pjf7044 - 19.03.2022 19:02

Thanks so much. I was so confused over import and export for a long time but you really simplified it! Makes total sense

Ответить
@tomtech1761
@tomtech1761 - 18.03.2022 16:20

Thank you so much🥰🥰🥰🥰🥰🥰

Ответить
@greekplayback
@greekplayback - 16.03.2022 08:16

Thanks , what vs code theme you are using in this video ?

Ответить
@devismailalif
@devismailalif - 05.03.2022 21:46

@dcode please provide source code

Ответить
@viswanathbijunair8564
@viswanathbijunair8564 - 05.03.2022 09:44

When I export variables between two javascript files, other functions in the first javascript file become defunct. Any help on how to solve this is appreciated !

Ответить
@anjalipawar2132
@anjalipawar2132 - 03.03.2022 18:09

very well explained...

Ответить
@shrishyle
@shrishyle - 27.02.2022 19:11

Hi I did not quite get the use case of the aggregating feature. In what scenarios would people be using it? And why would people prefer all the modules be exported from a single module....(it actually increases the length of code in case one has got hundred modules....code exporting the modules cannot be skipped...so also code for importing the modules also cannot be avoided....the code for bridging is extra code that one may have to write...although this makes the code structure relatively more systematic...can u please let me know in which scenarios it is used.

Ответить
@XxPepper17xX
@XxPepper17xX - 19.02.2022 04:18

NO ONE ON STACKEXCHANGE COULD EXPLAIN THIS. Thank you!

Ответить
@nik1545
@nik1545 - 17.02.2022 14:46

very tanks for this video

Ответить
@keivansf3459
@keivansf3459 - 12.02.2022 17:39

Thanks a lot!

Ответить
@daniellambert726
@daniellambert726 - 01.02.2022 19:02

Thank you so much for taking the time.

Ответить
@ashleysangma407
@ashleysangma407 - 29.01.2022 09:40

Thank you so much. Now I can write my code in much more peace.

Ответить
@moyura2
@moyura2 - 14.01.2022 06:15

It doesn't work, If you try to run it locally via file://, you would need a local web server e.g. Live Server extension in VS Code.

Ответить
@NathanMcclure
@NathanMcclure - 04.01.2022 05:40

YES! Thank you!

Ответить
@jignasajoshi27
@jignasajoshi27 - 30.12.2021 23:42

you explain everything very clearly but when i use same files i got CORS error.

Ответить