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; ?

3
  • 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. Commented May 2, 2019 at 12:28
  • @emix has it correct. Notice the , after init = funciton(){} it's just a continuation of variable declaration. Commented May 2, 2019 at 12:30
  • Indent the code properly the the problem disappears. Commented May 2, 2019 at 12:34

1 Answer 1

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;
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.