2
Hello!
I’m studying Javascript and I have a question. I come from a world called Java and there are private access modifiers, protected, public and even variable without modifier declaration; and with that I am a little lost in javascript.
It is possible to view the arquivo1.js through a Function, for example, in the arquivo2.js? Normally in java we leave the publish variable or we use getters and setters for such action.
I had this doubt because in an online course I arrived at the scope part and only addresses the scope in relation to the file itself, but the boy who teaches recommends to be careful with scopes because a variable can be accessible anywhere else in the project, but does not expose more details.
I wanted to know how this issue works in javascript, because my interest is to learn how to work with JS in the backend with Nodejs.
Any material you recommend that I read? Or a lecture or video lesson that talks about?
Thanks in advance!
It’s something very strange for me, but I’m getting used to the few rsrs Grateful my comrade!
– Jocsã