JavaScript Namespaces

preview_player
Показать описание
How to use namespaces in JavaScript to avoid conflicts with another developer's variables and functions.

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

These tutorials are the BEST ever uploaded on youtube, I am confident that it is only the matter of time the community following you will grow bigger and bigger. Please continue your style of teaching, We love it.

rotrose
Автор

Oh this is super awesome! I just came from programming C# with Unity. Namespaces are the key! Thanks Steve!

williambluish
Автор

Great series of videos - but the sound is poor - background hiss.

perkin
Автор

Thanks a lot Steve. I was trying to understand a JS library called Phaser 3 and I didn't understand the structure of it. I will give it a new try after this. Lots of love!

totfosk
Автор

Thank you! Really useful and clear, exactly what I was looking for it really helped

double__dash__
Автор

Just a note: this is immensely useful, and "can" be used for all intents and purposes as a "workaround" to mimic small namespaces. Some tricks would be required to continue to define the same namespace in additional javascript files that are part of this namespace to avoid creating an unwieldy jumbo file that is hard to navigate and maintain.

timb.
Автор

If you cannot predict colorDiv in namespace1.js will be used by namespace2.js. How you can predict TONY was used already in namespace1.js ?
If both case are not predictable. Why we don't simply change colorDiv to colorDiv2 in one of the js. It solve the same things.

ifcwlme
Автор

Regret to say that the suggested technique to passing object method as 2nd argument in addEventlistner method points to document rather pointing to method object when event to which its attached takes place ... where to send you my code snippets to have your suggestions...

ceeeskayaar
Автор

This tutorial is best but noise distracting

aminkushesh
Автор

to be clear, the ev parameter is the 'mouseover' and the 'mouseout' in this example?

MrMarkgyuro
Автор

After JS, do you suggest me what to learn next, people suggest me learn framework but I want to stick at JS a little while (I think my JS skill didn't enough when see your hundred of video about JS), also want to build app with backend stuff
I already approach with these: HTML, CSS, Sass, JS, npm, Fetch API, Async, Tailwind, ...

minercreepmc
Автор

sound not clear ... also if this was trying to solve problem of resolving conflict arising out of two authors of two scripts using same name then it has replaced that problem by declaring steve and tony which could have been same names ... so really the problem has not been solved

einsteinwallah
Автор

In this example you have a HTML file and a JavaScript file, is it possible to do it all just in a JavaScript file or is it best to have both?

jodycurry
Автор

What If we use something like this.key rather than objName.key

romeojoseph
Автор

can't i just use self invoked function to do the job ? i mean since i will not have access to the variables inside self invoked function ?

eh-lodo
Автор

This is NOT about namespaces. It's about letting procedural code behind and get into object- orientated coding.

catwhisperer
Автор

You create awesome videos but i need to say that your sound system is not good and hard to listen..

julybibhabib
Автор

What if both their name's are Tony :D

NurioonSoftware
Автор

Audio quality is really bad. Lots of static in the background

bdidue
welcome to shbcf.ru