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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -