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++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -