Activity Forums Salesforce® Discussions What reduce(function) will do in component.find() in Salesforce Lightning? Reply To: What reduce(function) will do in component.find() in Salesforce Lightning?

  • Parul

    Member
    September 20, 2018 at 6:07 pm

    Hi,

    reduce() is javaScript array method,  actually this is the syntax of this method :

    syntax : array.reduce(function(total, currentValue, currentIndex, arr), initialValue)

    In your scenario it will return field value from given field in InpCmp.