Avoid trailing comma in array and object literals code review.
Avoid trailing comma in array and object literals code review.
Hi All,
I am analyzing JavaScript code quality in Sonar.
Its reporting "Avoid trailing comma in array and object literals." in the below code, which is highlighted in red color .
Ext.apply(Ext.form.VTypes, { usPhone: function(v) { return /^\d{3}-\d{3}-\d{4}$/.test(v); }, usPhoneText: 'Please enter a US Phone number in the format 999-999-9999', usPhoneMask: /[\d\s\(\)\-]/i });