Declaration in javascript -


greetnigs.

i'm new in javascript , found not familiar me, yet. tell me how it's called , how works?

var empty = 0, snake = 1, fruit = 2;  var grid =  {     width: null,     height: null,     _grid: null,      init: function(d, c, r)     {      },      set: function(val, x, y)     {      },      get: function(x, y)     {      } } 

first declaration equal 3 separated in different lines var prefix?

second 1 object 3 properties , has declared 3 functions called: init, set , get, extended later , functions available object?

regards


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -