#Get variable from a class
4 messages · Page 1 of 1 (latest)
Can you please explain me how i can access to it with my function ?
You can not
regions.forEach(region => {
new RegionOption(region.nom, region.code);
})
this indicates that you are dealing with multiple reagions.
So of which region do you want to retrieve the dom_element? You'd have to first understand what you are trying to do anyway.
More generally:
- please add syntax highlighting to your code blocks, see #faq
- check the resources in #faq to learn JS
- do not mix
awaitand.then. They are different solutions to the same problem.awaitis preferred nowadays - in JS, it is preferred to use
camelCase, notsnake_case. But whichever you use, you should at least be consistent (regionSelectedvsloaded_regions)