0

While going through a new project source code, I immediately noticed something unfamiliar:

function(){
   var data = {},
       init = function(){},
       zend;

   return ..

}

So, what is zend; ?

Salman A
  • 229,425
  • 77
  • 398
  • 489
  • 2
    It looks like it's just declaring a variable called zend. Note the commas at the end of the previous two lines: this is just a continuation of the var line. – Rup May 02 '19 at 12:28
  • @emix has it correct. Notice the `,` after `init = funciton(){}` it's just a continuation of variable declaration. – Nina May 02 '19 at 12:30
  • Indent the code properly the the problem disappears. – Salman A May 02 '19 at 12:34

1 Answers1

1

It has no special meaning. In this context, it is just a variable name.

The code is equivalent to:

var data = {};
var init = function(){};
var zend;
Quentin
  • 800,325
  • 104
  • 1,079
  • 1,205