I'm reading a piece of code that is built like this:
var Template = function() { return `<?xml version="1.0" encoding="UTF-8" ?>
<document>
//other stuff
</document>`
}
The function is used in another file by doing
var resource = Template.call(self);
Coming from a C++/Objective-C/Swift background, I am guessing it's a function named Template
and returns whatever the stuff inside is. Could someone advise me what this construct is supposed to be?