JSLINT standards:
if(value != null){
Use '!==' to compare with 'null'.
if(name.dataIndex !='' || name.dataIndex != null){
Use '!==' to compare with ''.
if(rowIndex == 0){
Use '===' to compare with '0'.
data.push({description: obj['city'], required: true});
['city'] is better written in dot notation.
data.push({description: obj.city, required: true}); //dot notation as per jslint syntax
var obj = new Object();
Use the object literal notation {}.
//wrong
var x = {
prop: 10
},
y = x["prop"];
//correct
var x = {
prop: 10
},
y = x.prop;
if(value != null){
Use '!==' to compare with 'null'.
if(name.dataIndex !='' || name.dataIndex != null){
Use '!==' to compare with ''.
if(rowIndex == 0){
Use '===' to compare with '0'.
data.push({description: obj['city'], required: true});
['city'] is better written in dot notation.
data.push({description: obj.city, required: true}); //dot notation as per jslint syntax
var obj = new Object();
Use the object literal notation {}.
//wrong
var x = {
prop: 10
},
y = x["prop"];
//correct
var x = {
prop: 10
},
y = x.prop;
Comments
Post a Comment