• v29neil

    (@v29neil)


    Hi,
    I am developer of wordpress plugin. I want to point out one bad practice(maybe) in your code.
    I am not able to figure out which file.
    You are extending the native objects and modifying the behavior of Array class.
    Further refrence –
    https://stackoverflow.com/questions/14034180/why-is-extending-native-objects-a-bad-practice

    So whenever other developer try to do this-

    var myArray = [];
    console.log(myArray);    // it should print empty array but it is not . It is printing the properties which were added by extending the object. 

    It is adding _eachproperty

    So it is really messing our plugin code.
    For example –
    if i try to loop inside array

    for(var i in myArray){
    console.log(i);   //it is giving unwanted properties along with its own properties. 
    }

    If you have any way to avoid it . Do recommend us.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Third party plugin issue due to contact form maker plugin’ is closed to new replies.