There is the following code snippet included in the FOSS web-based application:
<script type="text/javascript">
(function() {
// code follows
// ...
})();
</script>
As you can see, the function definition is surrounded by an extra pair of brackets, also followed by another pair of brackets. There is no jQuery or any other JS framework used in the application. The function is not referenced/called later in the script.
Question: What will these characters (
(very first character of the JavaScript code and )();
(the last four characters of the js code) cause? And (more importantly) why?