I would like to know how I can write a method in such a way that I can later call a variable stored in it.
Of course, after I export and import into another Javascript file, I want to call the variable from the method, but I don't know exactly the syntax and if I have to use 'this'
I also don't know what to return to have all the declared variables available at any time
I want something like
class Security {
chooseEntrance(FrontEntrance, BackEntrance) {
FrontEntrance = //some code//
BackEntrance = //some code//
}
}
export default Security
And from another file, after import, call something like Security.chooseEntrance(FrontEntrance)
I hope I've set out all the data I need