The following code:
<script>
const output = {
testingSyntax: ['testTag 1', 'testTag2', 'testTag3']
}
**((arr) => {**
const myHtmlTags = [];
for (let i = 0; i < arr.length; i++) {
myHtmlTags.push(`<p> this is ${myHtmlTags[i]}</p>`);
}
return myHtmlTags
})(output.testingSyntax)
</script>
CONSOLE:
43htmlTagsScripting.html:8 Uncaught TypeError: {(intermediate value)} is not a function
at 43htmlTagsScripting.html:8
(html:8 line is the bold one)
Any idea what is wrong?
Thanks a lot. <3