i have the following code:
options.forEach((option) => {
return(option.get('template_name'))
})
where options contains a list of 2 maps
I expect this to return the template name, but instead I get 2
Why is this? How can I return from a forEach function in javascript?
.map().