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
Post a Comment