Javascript : Coding standards, Pascal Casing or Camel Casing? -


i creating calling function , passing in array of objects unsure if use camingcasing or pascalcasing. here method

util.load({         defaulttext:'empty',         items:[             {                 id:0,                 title:'press'             }         ] }); 

if notice passing in defaultext, should defaulttext? , items, should items? , within items , passing in id , title.

can confirm correct way of doing this?

i know methods camelcasing passing in objects above?

thanks in advance

the popular javascript convention use pascalcasing call constructors (classes), example string, number, date , camel casing variable names , object keys. code convention used built-in javascript functionality in modern browsers, thats why recommend use own code too.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -