This line is at the top of a JavaScript file in a project at school. Can someone tell me what exactly it does?
var Tele = { 'Forms': {}, 'Form': {} };
It is then followed with three functions like this that all contain more functions as exampled below.
FormsView.js
Tele.Forms.View = new function (){
this.SetRequestTitle = function (title) {
if (el.length == 0) {
setTimeout(function () { Tele.Forms.View.SetRequestTitle(title); }, 100);
return;
}
$('#FormTitleBarSubMenuText').html(title);
document.title = title;
};
....
....
};
Then there is a second JavaScript file FormView.js that only contains this
Tele.Form.View = new function () {
this.Initialize = function (data) {
Tele.Forms.View.SetRequestTitle('Approval Request');
};
};
I am new to JavaScript and scripting in general so I am just trying to figure out how things work. I understand what is happening inside the functions, just not what is tying it all together. Thanks!