I have written a TYPO3 extension with a template. Inside that template I have a JavaScript function between <script> tags. It came to my attention just now that the whole template is rendered by Fluid (correct?). Hence it should do something (or rather should not, because it's javascript and shouldn't be considered by Fluid) with the curly brackets (function (){...}) of my JavaScript function inside my <script> tags. Correct? This doesn't seem to be the case since my code has always worked. I'm wondering why it has always worked? Does TYPO3 recognize the script tags and ignores everything inside of them? This is TYPO3 6.2 by the way.
Now the more important question: how can I access an associative array, which I have assigned to the view via the controller, inside the javascript function which is between my <script> tags? I tried something like var x = {test_variable} inside my javascript function but this doesn't work. That's a hint that curly brackets inside JavaScript are not interpreted by Fluid. But I found sources which claim that they are. However the curly brackets seem to get ignored by Fluid in my case. Which explains why my javascript has always worked. I'm confused because I cannot explain all these things. Anyway, so how do I access the variables, that I have assigned to my view in the controller, inside my JavaScript? I hope it's clear what I mean.