将var。从文件.js导入到模块joomla的模板,并使用backoffice进行修改

I did some research but could not find the solution... I'm implementing a script in a module joomla, everything seems to work regularly. I should only change a function that should be regularly changed by varying a .JS In my case the change must take place from the back office module. i have this var in .js file

var playListID = "PLSSPBo7OVSZs96Cr6nEnzQpRDGwih38ie"

in my xml file to module have this field

<field name="playlist" type="text" label="playlist" />

What should I put in my default.php to do so by filling out the field take the variant inserted?

THANK YOU to anyone who can help me!

OK! I have export the function and have insert htmlspecialchars

    <script type="text/javascript">
    var playListID = "<?= htmlspecialchars($params->get('playlist')); ?>"; 
    </script>

Is Perfect!